Skip to content

Instantly share code, notes, and snippets.

@Fi1osof
Created January 21, 2013 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Fi1osof/4583503 to your computer and use it in GitHub Desktop.
Save Fi1osof/4583503 to your computer and use it in GitHub Desktop.
Свич процессоров в процессоре
<?php
class YleyCompaniesUsersGetListProcessor extends modProcessor{
public static function getInstance(modX &$modx,$className,$properties = array()) {
switch($properties['type']){
case 'company__':
$className = require_once dirname(__FILE__).'/users/getlist.class.php';
break;
default:
if($properties['id'] == 'root'){
$className = 'YleyCompaniesGetListProcessor';
}
}
return new $className($modx, $properties);
}
public function process() {
return $this->failure('Неверные данные');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment