/** * Setup the process * * @return void * @author Dan Cox */ public function setup() { if (is_null($this->params->directory)) { throw new Exceptions\RequiredArgumentException('Directory'); } parent::setCWD($this->params->directory); parent::setPrefix('composer'); }
/** * Sets up the process and adds nessecary commands to the builder. * * @return void * @author Dan Cox */ public function setup() { // Change directory parent::setCWD($this->params->directory); // Enable output parent::enableOutput(); // Add the prefix parent::setPrefix('ls'); // Add the list command parent::setArguments($this->params->arguments); }
/** * Setup the process * * @return void * @author Dan Cox */ public function setup() { if (is_null($this->params->directory)) { throw new Exceptions\RequiredArgumentException('directory'); } parent::setCWD($this->params->directory); parent::disableOutput(); if ($this->params->verbose) { parent::enableOutput(); } }
/** * Set up the process * * @return void * @author Dan Cox */ public function setup() { $arguments = array('vendor/bin/doctrine'); if (!empty($this->params->command)) { $arguments[] = $this->params->command; } if ($this->params->force) { $arguments[] = '--force'; } // Add the doctrine prefix parent::setPrefix('php'); // Add the arguments parent::setArguments($arguments); }
/** * Adding arguments * * @return void * @author Dan Cox */ public function test_addArguments() { $process = new Process(); $process->add('ls'); $p = $process->setPrefix('/usr/bin/bash')->setArguments(['-s', '-S'])->getProcess(); $this->assertEquals("'/usr/bin/bash' '-s' '-S'", $p->getCommandLine()); }
/** * Set up process * * @return void * @author Dan Cox */ public function setup() { // This just uses the tmp file to update/create/remove crons. parent::setPrefix('crontab'); parent::setArguments(['/tmp/crontab.txt']); }