예제 #1
0
 private function _hardDebugContent(ContentInterface $content)
 {
     echo Helper::debug($content->getBody(), 'content body');
     echo Helper::debug($content->getNotes(), 'content notes', false);
     echo Helper::debug($content->getMetadata(), 'content metadata', false);
 }
 private function _hardDebug()
 {
     $short_options = $this->getFilteredOptions('short_option');
     $long_options = $this->getFilteredOptions('long_option');
     echo Helper::debug(array_values($short_options), 'short options', false);
     echo Helper::debug(array_values($long_options), 'long options', false);
     echo Helper::debug($this->getFilteredOptions('_default'), 'defaults', false);
     echo Helper::debug($this->user_options->original, 'input user options', false);
     echo Helper::debug($this->user_options->remaining, 'remaining arguments', false);
     echo Helper::debug($this->user_options->options, 'final full options', false);
 }
예제 #3
0
 /**
  * Actually run the command process
  */
 public function run()
 {
     // common options
     $this->runCommonOptions();
     if (Stream::VERBOSITY_DEBUG <= $this->stream->getVerbosity()) {
         error_log(get_called_class() . ' :: starting a new run in debug mode');
     }
     // hard debug info
     $this->stream->debug(array('CLI available options:', Helper::debug($this->cli_options, null, false)));
     $this->stream->debug(array('User options:', Helper::debug($this->options, null, false)));
     $this->stream->debug(array('User arguments:', Helper::debug($this->arguments, null, false)));
     // a special task?
     if (count($this->arguments) === 1) {
         $args = $this->arguments;
         $task_method = 'runTask' . Helper::toCamelCase(str_replace('-', '_', array_shift($args)));
         if (method_exists($this, $task_method)) {
             call_user_func(array($this, $task_method));
             $this->stream->_exit();
         }
     }
     // parse arguments and render results
     $this->parseArguments()->renderOutput();
 }