コード例 #1
0
 /**
  * @param int $verbosity
  * @param null $decorated
  * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter
  */
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     if (null === $decorated) {
         $decorated = $this->hasColorSupport();
     }
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #2
0
 /**
  * Constructor.
  *
  * @param mixed                    $stream
  * @param bool|int                 $verbosity
  * @param null                     $decorated
  * @param OutputFormatterInterface $formatter
  */
 public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
         throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
     }
     $this->stream = $stream;
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #3
0
ファイル: NCursesOutput.php プロジェクト: jean-pasqualini/ia
 public function __construct()
 {
     parent::__construct();
     $this->setFormatter(new OutputFormatter());
     ncurses_init();
     //ncurses_mvaddstr(55,1,"My first ncurses application");
     $this->window = ncurses_newwin(40, 30, 0, 0);
     ncurses_wborder($this->window, 0, 0, 0, 0, 0, 0, 0, 0);
 }
コード例 #4
0
ファイル: StreamOutput.php プロジェクト: bangpound/pecan
 /**
  * Constructor.
  *
  * @param Stream $stream
  * @param bool|int $verbosity
  * @param null $decorated
  * @param OutputFormatterInterface $formatter
  */
 public function __construct(Stream $stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     $this->stream = $stream;
     $this->stream->on('error', function ($error) {
         $this->emit('error', [$error, $this]);
     });
     if (null === $decorated) {
         $decorated = $this->hasColorSupport();
     }
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #5
0
ファイル: CatchOutput.php プロジェクト: mjphaynes/php-resque
 /**
  * Constructor.
  *
  * @param integer                       $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
  * @param Boolean                       $decorated Whether to decorate messages
  * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
  */
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = true, OutputFormatterInterface $formatter = null)
 {
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #6
0
ファイル: FileOutput.php プロジェクト: int3rlop3r/phron
 /**
  * @param string $filepath Path to the output file
  */
 public function __construct($filepath = null)
 {
     parent::__construct(self::VERBOSITY_NORMAL, false, null);
     $this->filepath = $filepath;
     file_put_contents($filepath, "");
 }
コード例 #7
0
ファイル: TgTest.php プロジェクト: twhiston/tg
 public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null)
 {
     parent::__construct($verbosity, $decorated, $formatter);
     $this->messages = [];
 }
コード例 #8
0
 public function __construct($verbosity = self::VERBOSITY_NORMAL)
 {
     parent::__construct($verbosity);
 }
コード例 #9
0
ファイル: RemoteOutput.php プロジェクト: modera/module
 /**
  * @param callable $closure
  * @param bool|int $verbosity
  * @param bool $decorated
  * @param OutputFormatterInterface $formatter
  */
 public function __construct(\Closure $closure, $verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null)
 {
     $this->closure = $closure;
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #10
0
ファイル: JobOutput.php プロジェクト: theus77/ElasticMS
 public function __construct(Registry $doctrine, Job $job)
 {
     $this->doctrine = $doctrine;
     $this->job = $job;
     parent::__construct();
 }
 /**
  * Constructor.
  *
  * @param \LeLogger                     $logger    A logentries logger instance
  * @param int                           $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
  * @param bool|null                     $decorated Whether to decorate messages (null for auto-guessing)
  * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
  *
  * @throws \InvalidArgumentException When first argument is not a real logger
  *
  * @api
  */
 public function __construct(\LeLogger $logger, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
 {
     $this->logger = $logger;
     parent::__construct($verbosity, $decorated, $formatter);
 }
コード例 #12
0
ファイル: Output.php プロジェクト: m3dweb/bcnbit
 public function __construct($verbosity = self::VERBOSITY_NORMAL)
 {
     parent::__construct($verbosity, TRUE, new OutputFormatter(TRUE));
 }