Ejemplo n.º 1
0
 public function __construct($rmi, $event_handler)
 {
     $this->rmi = $rmi;
     $this->event_handler = $event_handler;
     self::$event_definition_holder = EventDefinitionHolder::getInstance();
     self::$argument_adapter_list = new ArgumentAdapterList();
     self::$argument_adapter_list->registerAdapter(new PersistenceAdapter());
     self::$argument_adapter_list->registerAdapter(new UserAdapter());
     self::$argument_adapter_list->registerAdapter(new MessagingAdapter());
     self::$argument_adapter_list->registerAdapter(new CustomHandlerAdapter());
 }
 public static function load($argc, $argv)
 {
     Config::loadConfig();
     self::phpEnviromentInit();
     Log::init(Config::$CORE['os_type'], GlobalState::$TYPE, Config::$CORE['logging_in_cloud_mode']);
     Log::writeInfo("Start CodeRunner.", $target = 'file');
     EventDefinitionHolder::getInstance()->load();
     if (GlobalState::$TYPE === 'LOCAL') {
         self::checkForInputKeys($argc, $argv);
         self::checkDefaultKeys();
         ClassManager::analyze();
         self::printGreeting();
     } else {
         self::checkInputKeysForCloud($argc, $argv);
     }
     $code_runner = new CodeRunner();
     $code_runner->loadMessageProcessor();
     $code_runner->start();
 }
 private function __construct()
 {
     self::$event_definition_holder = EventDefinitionHolder::getInstance();
 }