コード例 #1
0
ファイル: FFmpeg.php プロジェクト: cwcw/cms
 /**
  * Gets a raw media file info output.
  * You must parse the output to use the returned data.
  *
  * @param string $filename file name
  * @return array with stdout and stderr
  */
 public function getFileInfo($filename)
 {
     $parts = array($this->_commandPath . '/' . $this->_commandName, $this->_inputFileTag, $filename);
     $command = join(' ', $parts);
     $result = Streamwide_System_Command_Runner::runCommand($command, null, $return, $stdout);
     return $result;
 }
コード例 #2
0
ファイル: Abstract.php プロジェクト: cwcw/cms
 /**
  * Method used for executing a shell command.
  *
  * @param string $command The command which will be executed
  * @return mixed $result  The command output
  * @todo should log this
  */
 protected function _execute($command)
 {
     Streamwide_System_Command_Runner::runCommand($command, null, $result, $stdout);
     return $stdout;
 }
コード例 #3
0
ファイル: Command.php プロジェクト: cwcw/cms
 /**
  * Runs the command.
  *
  * @param  integer &$returnValue set this reference if you want to catch the command return value
  * @return array   associative array with 'stdout' and 'stderr' keys
  */
 public function run(&$returnValue = null)
 {
     $command = $this->getCommand();
     $result = Streamwide_System_Command_Runner::runCommand($command, null, $return);
     return $result;
 }