Пример #1
0
 /**
  * Inserts tabs before a line.
  *
  * @param int $tab
  * @return CLImate
  */
 protected function tab($tab)
 {
     if ($tab > 0) {
         $this->console->tab($tab);
     }
     return $this->console;
 }
Пример #2
0
 /**
  * Print out the argument list
  *
  * @param array $arguments
  * @param string $type
  */
 protected function outputArguments($arguments, $type)
 {
     if (count($arguments) == 0) {
         return;
     }
     $this->climate->br()->out(ucwords($type) . ' Arguments:');
     foreach ($arguments as $argument) {
         $this->climate->tab()->out($this->argument($argument));
         if ($argument->description()) {
             $this->climate->tab(2)->out($argument->description());
         }
     }
 }
Пример #3
0
 /**
  * Handle recursive arrays in the logging context.
  *
  * @param mixed  $level    The level of the log message
  * @param array  $context  The array of context to output
  * @param int    $indent   The current level of indentation to be used
  *
  * @return void
  */
 protected function outputRecursiveContext($level, array $context, $indent)
 {
     foreach ($context as $key => $val) {
         $this->climate->tab($indent);
         $this->climate->{$level}()->inline("{$key}: ");
         if (is_array($val)) {
             $this->climate->{$level}("[");
             $this->outputRecursiveContext($level, $val, $indent + 1);
             $this->climate->tab($indent)->{$level}("]");
         } else {
             $this->climate->{$level}((string) $val);
         }
     }
 }
Пример #4
0
 /**
  * Returns CLImate new tab
  * @see http://climate.thephpleague.com/terminal-objects/tab/
  *
  * @param  int $count Number of new tab
  * @return mixed
  */
 public function tab($count = 1)
 {
     return $this->climate->tab($count);
 }