Pagekit\View\View::__construct PHP Method

__construct() public method

Constructor.
public __construct ( Pagekit\Event\EventDispatcherInterface $events = null, Symfony\Component\Templating\EngineInterface $engine = null )
$events Pagekit\Event\EventDispatcherInterface
$engine Symfony\Component\Templating\EngineInterface
    public function __construct(EventDispatcherInterface $events = null, EngineInterface $engine = null)
    {
        $this->events = $events ?: new PrefixEventDispatcher('view.');
        $this->engine = $engine ?: new DelegatingEngine();
        $this->trigger('init', [$this]);
    }