enqueue($cmd); } return; } parent::enqueue($command); } public function execute(SocketObserver $scope = null) { $this->setIteratorMode(static::IT_MODE_DELETE); $recursive = new self; foreach ($this as $command) { $ret = $command->execute($scope); if ($ret instanceof CommandInterface) { $recursive->enqueue($ret); } } if (count($recursive) > 0) { return $recursive; } } }