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