コード例 #1
0
ファイル: Block.php プロジェクト: CaptainRalph/TapToDo
 public function deleteCommand($cmd)
 {
     $ret = false;
     for ($i = count($this->commands); $i >= 0; $i--) {
         if ($this->commands[$i]->getOriginalCommand() === $cmd || $this->commands[$i]->getCompiledCommand() === $cmd) {
             unset($this->commands[$i]);
             $ret = true;
         }
     }
     if ($ret) {
         $this->plugin->saveBlock($this);
     }
     return $ret;
 }