Command::execute PHP Method

execute() public method

命令角色
public execute ( )
    public function execute();

Usage Example

 /**
  * @param  Context $context
  * @return boolean
  **/
 public function execute(Context $context)
 {
     if ($context->getCurrentCommand() != 'begin') {
         throw new \Exception('構文が正しくありません');
     }
     if (is_null($this->next_command)) {
         throw new \Exception('次のコマンドが指定されていません');
     }
     $this->next_command->execute($context->next());
     return true;
 }
All Usage Examples Of Command::execute
Command