public function attachShared(SharedEventManagerInterface $events, $priority = 1000)
    {
        /* @var $events \Zend\EventManager\SharedEventManager */
        $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_BOOTSTRAP, array($this, 'onBootstrap'), $priority);
        $this->listener = [$this,'onBootstrap'];
    }