public function handle(Event $event) { $ipAdress = $this->_registry->getRequest()->getRemoteAddress(); if (in_array($ipAdress, $this->_blockedIps)) { $event->cancel(); } }