Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
CommandRenderer Class Reference
Inheritance diagram for CommandRenderer:
CommandRendererInterface CommandRendererBackground

Public Member Functions

 render ($command, array $arguments=[])
 

Detailed Description

Definition at line 8 of file CommandRenderer.php.

Member Function Documentation

◆ render()

render (   $command,
array  $arguments = [] 
)

Render command with arguments

Parameters
string$command
array$arguments
Returns
string

Implements CommandRendererInterface.

Definition at line 17 of file CommandRenderer.php.

18  {
19  $command = preg_replace('/(\s+2>&1)*(\s*\|)|$/', ' 2>&1$2', $command);
20  $arguments = array_map('escapeshellarg', $arguments);
21  if (empty($arguments)) {
22  return $command;
23  }
24  return vsprintf($command, $arguments);
25  }
$arguments

The documentation for this class was generated from the following file: