Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a123c08

Browse filesBrowse files
authored
[Process] allow writing "prepared" command line.
1 parent 17170ed commit a123c08
Copy full SHA for a123c08

File tree

1 file changed

+12
-0
lines changed
Filter options

1 file changed

+12
-0
lines changed

‎components/process.rst

Copy file name to clipboardExpand all lines: components/process.rst
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,18 @@ instead::
350350
);
351351
$process->run();
352352

353+
Using the prepared command lines
354+
--------------------------------
355+
356+
This component also provides a way to use the process command with prepared using the double brackets notations:
357+
358+
use Symfony\Component\Process\Process;
359+
360+
$process = Process::fromShellCommandline('echo "$name"');
361+
$process->run(null, array('name' => 'elsa'));
362+
363+
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. The component will not escape the characters, you are responsible of doing so.
364+
353365
Process Timeout
354366
---------------
355367

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.