<?php

namespace Neag\MainBundle\Event;

use Symfony\Component\HttpKernel\Event\FilterControllerEvent;

//use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
//use Symfony\Component\HttpFoundation\Response;

class ControllerConstructor
{
    public function onKernelController(FilterControllerEvent $event)
    {
        $controller = $event->getController();
        //if (!is_object($controller)) {
            // not a object but a different kind of callable. Do nothing
            //return;
        //}

        $controllerObject = $controller[0];
        //if ($controllerObject instanceof ControllerAbstract) {
            $controllerObject->initialize();
        //}
    }
}

?>