Skip to content

Instantly share code, notes, and snippets.

View danizord's full-sized avatar

Danizord danizord

View GitHub Profile
@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;
/**