Ejemplo n.º 1
0
Archivo: Dsl.php Proyecto: chh/bob
function php($argv, $callback = null, $options = array())
{
    $execFinder = new \Symfony\Component\Process\PhpExecutableFinder();
    $php = $execFinder->find();
    $argv = (array) $argv;
    array_unshift($argv, $php);
    return sh($argv, $callback, $options);
}
Ejemplo n.º 2
0
 private static function _createServerProcess($documentRoot)
 {
     $finder = new \Symfony\Component\Process\PhpExecutableFinder();
     if (false === ($binary = $finder->find())) {
         throw new RuntimeException('Unable to find PHP binary to start server.');
     }
     $script = implode(' ', array_map(array('Symfony\\Component\\Process\\ProcessUtils', 'escapeArgument'), array($binary, '-S', self::$_WEB_SERVER_ADDRESS)));
     return new \Symfony\Component\Process\Process('exec ' . $script, $documentRoot, null, null, null);
 }
Ejemplo n.º 3
0
 protected function getPhpBinary()
 {
     $executableFinder = new \Symfony\Component\Process\PhpExecutableFinder();
     return $executableFinder->find();
 }