for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Ivory Http Adapter package.
*
* (c) Eric GELOEN <[email protected]>
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code.
*/
namespace Ivory\HttpAdapter\Event\Subscriber;
use Ivory\HttpAdapter\Event\Formatter\Formatter;
use Ivory\HttpAdapter\Event\Formatter\FormatterInterface;
use Ivory\HttpAdapter\Event\Timer\TimerInterface;
/**
* @author GeLo <[email protected]>
abstract class AbstractFormatterSubscriber extends AbstractTimerSubscriber
{
* @var FormatterInterface
private $formatter;
* @param FormatterInterface|null $formatter
* @param TimerInterface|null $timer
public function __construct(FormatterInterface $formatter = null, TimerInterface $timer = null)
parent::__construct($timer);
$this->formatter = $formatter ?: new Formatter();
}
* @return FormatterInterface
public function getFormatter()
return $this->formatter;