/** * Gets the command string to be executed * @return string */ private function prepareCommand() { $this->commandLine->setExecutable($this->getPhp()); $composerCommand = $this->commandLine->createArgument(true); $composerCommand->setValue($this->getCommand()); $composerPath = $this->commandLine->createArgument(true); $composerPath->setValue($this->getCOmposer()); }
/** * Prepares the command string to be executed * @return string */ private function prepareCommandLine() { $this->commandLine->setExecutable($this->getPhp()); //We are un-shifting arguments to the beginning of the command line because arguments should be at the end $this->commandLine->createArgument(true)->setValue($this->getCommand()); $this->commandLine->createArgument(true)->setValue($this->getComposer()); $commandLine = strval($this->commandLine); //Creating new Commandline instance. It allows to handle subsequent calls correctly $this->commandLine = new Commandline(); return $commandLine; }
/** * Prepare task for running */ private function prepare() { if (!isset($this->docroot)) { $this->docroot = $this->project->getProperty("project.basedir"); } $this->commandline->setExecutable(PHP_BINARY); foreach ($this->configData as $config) { $this->commandline->createArgument()->setValue('-d'); $this->commandline->createArgument()->setValue($config->getName() . '=' . $config->getValue()); } $this->commandline->createArgument()->setValue('-S'); $this->commandline->createArgument()->setValue($this->address . ':' . $this->port); $this->commandline->createArgument()->setValue('-t'); $this->commandline->createArgument()->setValue($this->docroot); if (isset($this->router)) { $this->commandline->createArgument()->setValue($this->router); } }
/** * Creates a nested <arg> tag. * * @return CommandlineArgument Argument object */ public function createArg() { return $this->commandline->createArgument(); }