示例#1
0
 /**
  * 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');
 }
示例#2
0
 /**
  * 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);
 }
示例#3
0
 /**
  * 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();
     }
 }
示例#4
0
 /**
  * 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);
 }
示例#5
0
 /**
  * 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());
 }
示例#6
0
 /**
  * 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']);
 }