當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ProcessUtils::validateInput方法代碼示例

本文整理匯總了PHP中Symfony\Component\Process\ProcessUtils::validateInput方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProcessUtils::validateInput方法的具體用法?PHP ProcessUtils::validateInput怎麽用?PHP ProcessUtils::validateInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Process\ProcessUtils的用法示例。


在下文中一共展示了ProcessUtils::validateInput方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: write

 /**
  * Appends an input to the write buffer.
  *
  * @param resource|scalar|\Traversable|null The input to append as stream resource, scalar or \Traversable
  */
 public function write($input)
 {
     if (null === $input) {
         return;
     }
     if ($this->isClosed()) {
         throw new RuntimeException(sprintf('%s is closed', static::class));
     }
     $this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
 }
開發者ID:Ener-Getick,項目名稱:symfony,代碼行數:15,代碼來源:InputStream.php

示例2: setStdin

 /**
  * Sets the contents of STDIN.
  *
  * @param string|null $stdin The new contents
  *
  * @return self The current Process instance
  *
  * @throws LogicException           In case the process is running
  * @throws InvalidArgumentException In case the argument is invalid
  */
 public function setStdin($stdin)
 {
     if ($this->isRunning()) {
         throw new LogicException('STDIN can not be set while the process is running.');
     }
     $this->stdin = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $stdin);
     return $this;
 }
開發者ID:rajdamaciej,項目名稱:mycms,代碼行數:18,代碼來源:Process.php

示例3: setInput

 /**
  * Sets the input of the process.
  *
  * @param string|null $input The input as a string
  *
  * @return ProcessBuilder
  *
  * @throws InvalidArgumentException In case the argument is invalid
  */
 public function setInput($input)
 {
     $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);
     return $this;
 }
開發者ID:saberyounis,項目名稱:Sonata-Project,代碼行數:14,代碼來源:ProcessBuilder.php

示例4: setInput

 /**
  * Sets the input of the process.
  *
  * @param mixed $input The input as a string
  *
  * @return ProcessBuilder
  *
  * @throws InvalidArgumentException In case the argument is invalid
  */
 public function setInput($input)
 {
     $this->input = ProcessUtils::validateInput(__METHOD__, $input);
     return $this;
 }
開發者ID:levanigongadze,項目名稱:Labweb,代碼行數:14,代碼來源:ProcessBuilder.php

示例5: setInput

 /**
  * Sets the input.
  *
  * This content will be passed to the underlying process standard input.
  *
  * @param resource|scalar|\Traversable|null $input The content
  *
  * @return self The current Process instance
  *
  * @throws LogicException In case the process is running
  */
 public function setInput($input)
 {
     if ($this->isRunning()) {
         throw new LogicException('Input can not be set while the process is running.');
     }
     $this->input = ProcessUtils::validateInput(__METHOD__, $input);
     return $this;
 }
開發者ID:MisatoTremor,項目名稱:symfony,代碼行數:19,代碼來源:Process.php


注:本文中的Symfony\Component\Process\ProcessUtils::validateInput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。