Skip to content

Instantly share code, notes, and snippets.

@danizord
danizord / AuthenticationListener.php
Last active January 1, 2016 07:39
Redirects unauthenticated users to login
<?php
namespace MyApp\Authentication;
use Zend\EventManager\AbstractListenerAggregate;
use Zend\EventManager\EventManagerInterface;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\ResponseInterface;
/**