Changeset View
Changeset View
Standalone View
Standalone View
src/future/exec/PhutilExecutableFuture.php
<?php | <?php | ||||
/** | /** | ||||
* @task config Configuring the Command | * @task config Configuring the Command | ||||
*/ | */ | ||||
abstract class PhutilExecutableFuture extends Future { | abstract class PhutilExecutableFuture extends Future { | ||||
private $command; | private $command; | ||||
private $env; | private $env; | ||||
private $cwd; | private $cwd; | ||||
private $resolveOnError = true; | |||||
final public function __construct($pattern /* , ... */) { | final public function __construct($pattern /* , ... */) { | ||||
$args = func_get_args(); | $args = func_get_args(); | ||||
if ($pattern instanceof PhutilCommandString) { | if ($pattern instanceof PhutilCommandString) { | ||||
if (count($args) !== 1) { | if (count($args) !== 1) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
Show All 10 Lines | final public function __construct($pattern /* , ... */) { | ||||
$this->didConstruct(); | $this->didConstruct(); | ||||
} | } | ||||
protected function didConstruct() { | protected function didConstruct() { | ||||
return; | return; | ||||
} | } | ||||
final public function setResolveOnError($resolve_on_error) { | |||||
$this->resolveOnError = $resolve_on_error; | |||||
return $this; | |||||
} | |||||
final public function getResolveOnError() { | |||||
return $this->resolveOnError; | |||||
} | |||||
final public function getCommand() { | final public function getCommand() { | ||||
return $this->command; | return $this->command; | ||||
} | } | ||||
/** | /** | ||||
* Set environmental variables for the command. | * Set environmental variables for the command. | ||||
* | * | ||||
* By default, variables are added to the environment of this process. You | * By default, variables are added to the environment of this process. You | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |