Lines Matching refs:this

10  * Your commandline should not inherit from this class, but from one of the *CLI* classes
49 set_exception_handler(array($this, 'fatal'));
52 $this->colors = new Colors();
53 $this->options = new Options($this->colors);
69 * Arguments and options have been parsed when this is run
93 $this->setup($this->options);
94 $this->registerDefaultOptions();
95 $this->parseOptions();
96 $this->handleDefaultOptions();
97 $this->setupLogging();
98 $this->checkArguments();
99 $this->execute();
109 $this->options->registerOption(
111 'Display this help screen and exit immediately.',
114 $this->options->registerOption(
118 $this->options->registerOption(
120 'Minimum level of messages to display. Default is ' . $this->colors->wrap($this->logdefault, Colors::C_CYAN) . '. ' .
132 if ($this->options->getOpt('no-colors')) {
133 $this->colors->disable();
135 if ($this->options->getOpt('help')) {
136 echo $this->options->help();
146 $level = $this->options->getOpt('loglevel', $this->logdefault);
147 if (!isset($this->loglevel[$level])) $this->fatal('Unknown log level');
148 foreach (array_keys($this->loglevel) as $l) {
150 unset($this->loglevel[$l]);
159 $this->options->parseOptions();
167 $this->options->checkArguments();
175 $this->main($this->options);
193 $this->logMessage('debug', get_class($error) . ' caught in ' . $error->getFile() . ':' . $error->getLine());
194 $this->logMessage('debug', $error->getTraceAsString());
203 $this->logMessage('critical', $error, $context);
215 $this->logMessage('success', $string, $context);
225 // is this log level wanted?
226 if (!isset($this->loglevel[$level])) return;
231 list($prefix, $color, $channel) = $this->loglevel[$level];
232 if (!$this->colors->isEnabled()) $prefix = '';
234 $message = $this->interpolate($message, $context);
235 $this->colors->ptln($prefix . $message, $color, $channel);