|
@@ 35-41 (lines=7) @@
|
| 32 |
|
* @param string $filePath The path to the file to view. |
| 33 |
|
* @return \Symfony\Component\Process\Process The already-executed process. |
| 34 |
|
*/ |
| 35 |
|
public function viewFile(ProcessBuilder $processBuilder, $filePath) |
| 36 |
|
{ |
| 37 |
|
$proc = $processBuilder->setPrefix($this->_pagerCommand)->setArguments([$filePath])->getProcess(); |
| 38 |
|
$proc->setTty(true)->run(); |
| 39 |
|
|
| 40 |
|
return $proc; |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* View the given data using the symfony process builder to build the |
|
@@ 53-59 (lines=7) @@
|
| 50 |
|
* @param string $data The data to view. |
| 51 |
|
* @return \Symfony\Component\Process\Process The already-executed process. |
| 52 |
|
*/ |
| 53 |
|
public function viewData(ProcessBuilder $processBuilder, $data) |
| 54 |
|
{ |
| 55 |
|
$proc = $processBuilder->setPrefix($this->_pagerCommand)->setInput($data)->getProcess(); |
| 56 |
|
$proc->setTty(true)->run(); |
| 57 |
|
|
| 58 |
|
return $proc; |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
|