protected function _initialize(KObjectConfig $config)
 {
     $config->append(array('priority' => KEvent::PRIORITY_HIGH));
     parent::_initialize($config);
 }
示例#2
0
 /**
  * Add a command by it's name
  *
  * @param   string  Method name
  * @param   array   Array containing all the arguments for the original call
  * @see addCommand()
  */
 public function __call($method, $args)
 {
     $parts = KInflector::explode($method);
     if ($parts[0] == 'add' && isset($parts[1])) {
         $config = isset($args[0]) ? $args[0] : array();
         $this->addCommand(strtolower($parts[1]), $config);
         return $this;
     }
     return parent::__call($method, $args);
 }