AsseticBundle\Listener::attach PHP Method

attach() public method

Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
public attach ( Zend\EventManager\EventManagerInterface $events, integer $priority = 32 )
$events Zend\EventManager\EventManagerInterface
$priority integer The priority with which the events are attached
    public function attach(EventManagerInterface $events, $priority = 32)
    {
        $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'renderAssets'], $priority);
        $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'renderAssets'], $priority);
    }