コード例 #1
0
ファイル: Commands.php プロジェクト: gitter-badger/MyPlot
 private function loadSubCommand(Subcommand $command)
 {
     $this->subCommands[$command->getName()] = $command;
     if ($command->getAlias() != "") {
         $this->aliasSubCommands[$command->getAlias()] = $command;
     }
 }
コード例 #2
0
ファイル: Commands.php プロジェクト: mwvent/WattzMCPE-MyPlot
 private function loadSubCommand(Subcommand $command)
 {
     $this->commandObjects[] = $command;
     $commandId = count($this->commandObjects) - 1;
     $this->subCommands[$command->getName()] = $commandId;
     foreach ($command->getAliases() as $alias) {
         $this->subCommands[$alias] = $commandId;
     }
 }
コード例 #3
0
ファイル: dispatcher.php プロジェクト: netcon-source/wp-cli
 function __construct($class, $method, $parent)
 {
     $callable = array(new $class(), $method->name);
     parent::__construct(self::_get_name($method), $callable, $method, $parent);
 }
コード例 #4
0
ファイル: dispatcher.php プロジェクト: nunomorgadinho/wp-cli
 function __construct($name, $callable)
 {
     $this->name = $name;
     $this->callable = $callable;
     $method = new \ReflectionMethod($this->callable, '__invoke');
     parent::__construct($method);
 }