From efe1a9f8cc847f3ede719f8afbdf14bc51b36227 Mon Sep 17 00:00:00 2001 From: Hamza Amrouche Date: Mon, 19 Feb 2018 15:00:02 +0100 Subject: [PATCH] [Process] allow writing "prepared" command line. https://github.com/symfony/symfony/pull/24763 --- components/process.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/process.rst b/components/process.rst index 85616d960d1..33902b54979 100644 --- a/components/process.rst +++ b/components/process.rst @@ -410,6 +410,18 @@ Use :method:`Symfony\\Component\\Process\\Process::disableOutput` and However, it is possible to pass a callback to the ``start``, ``run`` or ``mustRun`` methods to handle process output in a streaming fashion. + +Using the prepared command lines +-------------------------------- + +This components also provides a way to use the process command with prepared using the double brackets notations: + + use Symfony\Component\Process\Process; + + $process = new Process('/usr/bin/php {{ phpFile }}'); + $process->run(null, array('phpFile' => 'worker.php')); + +Which means that you can use placeholder in order to have a process that can be changed only with the values and without changing the php code. Finding the Executable PHP Binary --------------------------------- pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy