Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\Worker\Bin\Start Class Reference
Inheritance diagram for Hoa\Worker\Bin\Start:

Public Member Functions

 main ()
 
 usage ()
 
- Public Member Functions inherited from Hoa\Console\Dispatcher\Kit
 __construct (Router $router, Dispatcher $dispatcher, View\Viewable $view=null)
 
 getOption (&$optionValue, $short=null)
 
 setOptions (Array $options)
 
 makeUsageOptionsList (Array $definitions=[])
 
 resolveOptionAmbiguity (Array $solutions)
 
 status ($text, $status)
 
 readLine ($prefix=null)
 
 readPassword ($prefix=null)
 
- Public Member Functions inherited from Hoa\Dispatcher\Kit
 __construct (Router $router, Dispatcher $dispatcher, View\Viewable $view=null)
 
 construct ()
 

Protected Attributes

 $options
 
- Protected Attributes inherited from Hoa\Console\Dispatcher\Kit
 $options = null
 
 $_options = null
 

Additional Inherited Members

- Public Attributes inherited from Hoa\Console\Dispatcher\Kit
 $parser = null
 
- Public Attributes inherited from Hoa\Dispatcher\Kit
 $router = null
 
 $dispatcher = null
 
 $view = null
 
 $data = null
 

Detailed Description

Class .

Start a worker.

Definition at line 50 of file Start.php.

Member Function Documentation

Hoa\Worker\Bin\Start::main ( )

The entry method.

Returns
void

Definition at line 70 of file Start.php.

71  {
72  $fastcgi = '127.0.0.1:9000';
73 
74  while (false !== $c = $this->getOption($v)) {
75  switch ($c) {
76  case 'f':
77  $fastcgi = $v;
78 
79  break;
80 
81  case 'h':
82  case '?':
83  return $this->usage();
84 
85  case '__ambiguous':
86  $this->resolveOptionAmbiguity($v);
87 
88  break;
89  }
90  }
91 
92  $this->parser->listInputs($workerPath);
93 
94  if (null === $workerPath) {
95  return $this->usage();
96  }
97 
99  'tcp://' . $fastcgi,
100  $workerPath
101  );
102 
103  echo $output, "\n";
104 
105  return;
106  }
getOption(&$optionValue, $short=null)
Definition: Kit.php:104
resolveOptionAmbiguity(Array $solutions)
Definition: Kit.php:190
static start($socket, $workerPath, Array $fastcgiParameters=[])
Definition: Shared.php:295

Here is the call graph for this function:

Hoa\Worker\Bin\Start::usage ( )

The command usage.

Returns
void

Definition at line 113 of file Start.php.

114  {
115  echo
116  'Usage : worker:start <options> <worker_path>', "\n",
117  'Options :', "\n",
118  $this->makeUsageOptionsList([
119  'f' => 'PHP-FPM socket URI (default: 127.0.0.1:9000).',
120  'help' => 'This help.'
121  ]), "\n";
122 
123  return;
124  }
makeUsageOptionsList(Array $definitions=[])
Definition: Kit.php:149

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Hoa\Worker\Bin\Start::$options
protected
Initial value:

Definition at line 57 of file Start.php.


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