isVerbose() public method

Returns whether the verbosity is {@link VERBOSE} or greater.
public isVerbose ( ) : boolean
return boolean Returns `true` if the verbosity is {@link VERBOSE} or greater and `false` otherwise.
 public function handleShow(Args $args, IO $io)
 {
     $this->style->title('Show profile information');
     if ($io->isVerbose()) {
         $this->style->text([sprintf('// Using config file: %s', $this->config->get('config_file', '')), sprintf('// Project directory: %s', $this->config->get('project_directory', '')), sprintf('// Dancer config directory: %s', $this->config->get('dancer_directory', ''))]);
     }
     $profileNames = array_keys($this->config->getProfiles());
     if (!($profileName = $args->getArgument('name'))) {
         $profileName = $this->style->choice('Profile to show', $profileNames);
     }
     if (null === $profileName) {
         $this->style->error(sprintf('Unable to find a profile with name "%s".', $profileName));
         return 1;
     }
     $this->style->section($profileName);
     $this->renderResolvedProfile($this->config->getProfiles()[$profileName], $io->isVerbose());
     return 0;
 }
Esempio n. 2
0
 /**
  * Renders the exception trace.
  *
  * @param IO  $io          The I/O.
  * @param int $indentation The number of spaces to indent.
  */
 public function render(IO $io, $indentation = 0)
 {
     if (!$io->isVerbose()) {
         $io->errorLine('fatal: ' . $this->exception->getMessage());
         return;
     }
     $exception = $this->exception;
     $this->renderException($io, $exception);
     if ($io->isVeryVerbose()) {
         while ($exception = $exception->getPrevious()) {
             $io->errorLine('Caused by:');
             $this->renderException($io, $exception);
         }
     }
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function isVerbose()
 {
     return $this->io->isVerbose();
 }