Hoa central
Static Public Member Functions | List of all members
Hoa\Console\Chrome\Editor Class Reference

Static Public Member Functions

static open ($file= '', $editor=null)
 

Detailed Description

Class .

Start an editor.

Definition at line 49 of file Editor.php.

Member Function Documentation

static Hoa\Console\Chrome\Editor::open (   $file = '',
  $editor = null 
)
static

Open an editor.

Parameters
string$fileFile to open.
string$editorEditor to use ($_SERVER['EDITOR'] by default).
Returns
string

Definition at line 59 of file Editor.php.

60  {
61  if (null === $editor) {
62  if (isset($_SERVER['EDITOR'])) {
63  $editor = $_SERVER['EDITOR'];
64  } else {
65  $editor = 'vi';
66  }
67  }
68 
69  if (!empty($file)) {
70  $file = escapeshellarg($file);
71  }
72 
74  $editor . ' ' . $file . ' > `tty` < `tty`',
75  false
76  );
77  }
static execute($commandLine, $escape=true)
Definition: Processus.php:1165

Here is the call graph for this function:

Here is the caller graph for this function:


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