当前位置: 首页>>代码示例>>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;未经允许,请勿转载。