validateInput() public static method

验证并进行规范化Process输入。
public static validateInput ( string $caller, mixed $input ) : string
$caller string
$input mixed
return string
コード例 #1
0
ファイル: Process.php プロジェクト: top-think/framework
 /**
  * 设置输入
  * @param mixed $input
  * @return self
  */
 public function setInput($input)
 {
     if ($this->isRunning()) {
         throw new \LogicException('Input can not be set while the process is running.');
     }
     $this->input = Utils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
     return $this;
 }
コード例 #2
0
ファイル: Builder.php プロジェクト: Lofanmi/think
 /**
  * 设置输入
  * @param mixed $input
  * @return self
  */
 public function setInput($input)
 {
     $this->input = Utils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
     return $this;
 }