Changeset View
Changeset View
Standalone View
Standalone View
src/future/exec/PhutilExecutableFuture.php
Show All 13 Lines | 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( | ||||
'Command (of class "%s") was constructed with a '. | 'Command (of class "%s") was constructed with a '. | ||||
'"PhutilCommandString", but also passed arguments. '. | '"PhutilCommandString", but also passed arguments. '. | ||||
'When using a preprebuilt command, you must not pass '. | 'When using a prebuilt command, you must not pass '. | ||||
'arguments.', | 'arguments.', | ||||
get_class($this))); | get_class($this))); | ||||
} | } | ||||
$this->command = $pattern; | $this->command = $pattern; | ||||
} else { | } else { | ||||
$this->command = call_user_func_array('csprintf', $args); | $this->command = call_user_func_array('csprintf', $args); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |