Commit Graph

20 Commits

Author SHA1 Message Date
Fabien Potencier
2c3672bff8 [HttpKernel] added request and response as arguments to the TerminableInterface::terminate() method 2011-12-15 18:16:29 +01:00
Jordi Boggiano
7efe4bcb87 [HttpKernel] Add Kernel::terminate() and HttpKernel::terminate() for post-response logic 2011-12-06 11:09:36 +01:00
Jordi Boggiano
7350109f6e Renamed core.* events to kernel.* and CoreEvents to KernelEvents 2011-06-21 16:35:14 +02:00
Victor Berchet
5069fe2cf2 [HttpKernel] Fix randomly failing tests 2011-06-14 22:30:49 +02:00
Fabien Potencier
c171142c01 renamed constants to upper cased 2011-05-30 09:04:37 +02:00
Jordi Boggiano
af0bd8a136 Update Core and Security events to latest model
The main benefit is that in XML/YML files we have common syntax (i.e. core.controller, form.pre_bind) that properly namespaces event names (before: onCoreController was ok, preBind was not).
On the other hand in PHP land we also have namespaced events, CoreEvents::controller, FormEvents::preBind, before it was Events::onCoreController, Events::onPreBind, we now have more context.
2011-05-26 11:55:07 +02:00
Fabien Potencier
c6818d8bf7 [HttpKernel] added support for controllers as arrays and object with an __invoke method
Controllers can now be any valid PHP callable
2011-04-16 16:26:15 +02:00
Fabien Potencier
6c8e71c8e7 renamed filterCore* to onCore*
The onCore* events are fired at some pre-defined points during the
handling of a request. At this is more important than the fact
that you can change things from the event.
2011-03-17 17:01:59 +01:00
Fabien Potencier
1219b98ec5 renamed some methods in the event dispatcher 2011-03-17 15:27:42 +01:00
Bernhard Schussek
06c682b4fb Switched from Doctrine's EventManager implementation to the EventManager clone in Symfony2 (now called EventDispatcher again) 2011-03-13 19:49:10 +01:00
Bernhard Schussek
2cf3779a2c Renamed EventArgs classes and adapted remaining code to EventManager
The only missing part is ContainerAwareEventManager::addEventSubscriberService(),
because I'm not sure how to find out the class name of a service in the DIC.

Also, inline documentation of this code needs to be finished once it is accepted.
2011-03-07 19:16:05 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Fabien Potencier
fc372bc217 [HttpKernel] changed core.view event to use notifyUntil() instead of filter() -- as soon as a listener returns a Response, we are done 2011-02-21 18:24:55 +01:00
Fabien Potencier
8b62df7247 changed the EventDispatcher and Event interfaces
The three notification methods do not return the Event instance anymore.

notify() does not return anything
notifyUntil() returns the returned value of the event that has processed the event
filter() returns the filtered value

Upgrading your listeners:
Listeners for notify() and filter() events: nothing to change
Listeners for notifyUntil() events:

Before:

    $event->setReturnValue('foo');
    return true;

After:

    $event->setProcessed();
    return 'foo';

If you notify events, the processing also need to be changed:

For filter() notifications: the filtered value is now available as
the returned value of the filter() method.

For notifyUntil() notifications:

Before:

    $event = $dispatcher->notifyUntil($event);
    if ($event->isProcessed()) {
        $ret = $event->getReturnValue();

        // do something with $ret
    }

After:

    $ret = $dispatcher->notifyUntil($event);
    if ($event->isProcessed()) {
        // do something with $ret
    }
2011-01-26 08:41:59 +01:00
Johannes M. Schmitt
1d5b6ed908 adds scope to the DI container 2011-01-22 15:20:50 +01:00
Kris Wallsmith
5da423be20 [HttpKernel] Added getRequest() to HttpKernelInterface. 2010-12-10 08:43:05 +01:00
Jeremy Mikola
2ff474fc3a [HttpKernel][FrameworkBundle] Rename BaseHttpKernel to HttpKernel
The original HttpKernel class can be deleted, as it's request-stashing will be moved to the Kernel class.  FrameworkBundle's list of compiled classes must also be modified to respect this change.
2010-12-09 09:38:13 +01:00
Fabien Potencier
513163648e fixed a unit test 2010-11-10 07:50:30 +01:00
Fabien Potencier
a471f65759 [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
Fabien Potencier
556bfcb804 [HttpKernel] added some more unit tests 2010-11-02 18:38:11 +01:00