/** * Creates a formatter subscriber. * * @param \Ivory\HttpAdapter\Event\Formatter\FormatterInterface|null $formatter The formatter. * @param \Ivory\HttpAdapter\Event\Timer\TimerInterface|null $timer The timer. */ public function __construct(FormatterInterface $formatter = null, TimerInterface $timer = null) { parent::__construct($timer); $this->formatter = $formatter ?: new Formatter(); }
/** * Creates an history subscriber. * * @param \Ivory\HttpAdapter\Event\History\JournalInterface|null $journal The journal * @param \Ivory\HttpAdapter\Event\Timer\TimerInterface|null $timer The timer. */ public function __construct(JournalInterface $journal = null, TimerInterface $timer = null) { parent::__construct($timer); $this->setJournal($journal ?: new Journal()); }