Some of the primary events are listed here:
http://symfony.com/doc/2.0/book/internals/kernel.html#events

You likely want "onCoreRequest" and "onCoreResponse".

On Apr 17, 10:00 am, David Buchmann <david.buchm...@liip.ch> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> was starting to write you should have a look at the 
> dochttp://symfony.com/doc/2.0/book
>
> but actually, it is not in there, or at least not where i would expect
> it to be.
>
> however, google for symfony2 event brings up this as second 
> result:http://blog.bearwoods.dk/symfony2-adding-a-event-listener
>
> there is also a way to specify what event you want to listen to, for example
>
> services:
>     liip.demo.cachecontrol:
>         class: Liip\CoreBundle\Helper\CacheControl
>         tags:
>             - { name: kernel.listener, event: onCoreResponse }
>
> Am 17.04.2011 16:33, schrieb A A:
>
>
>
>
>
>
>
>
>
> > Could you please provide some piece of code?
>
> > 2011/4/16 Jordi Boggiano <j.boggi...@seld.be <mailto:j.boggi...@seld.be>>
>
> >     On 15.04.2011 09:23, noRerih wrote:
> >     > Hi all, is there way to execute some code before (and after) every
> >     > action in Symfony2? Constructor doesn't work 'cause it invokes before
> >     > services are launched and has no access to them, and therefore I can't
> >     > get Request object.
>
> >     You should look into register core.request and core.response event
> >     listeners, they can receive any service, including the request.
>
> >     Cheers
>
> >     --
> >     Jordi Boggiano
> >     @seldaek ::http://seld.be/
>
> >     --
> >     If you want to report a vulnerability issue on symfony, please send
> >     it to security at symfony-project.com <http://symfony-project.com>
>
> >     You received this message because you are subscribed to the Google
> >     Groups "symfony users" group.
> >     To post to this group, send email to symfony-users@googlegroups.com
> >     <mailto:symfony-users@googlegroups.com>
> >     To unsubscribe from this group, send email to
> >     symfony-users+unsubscr...@googlegroups.com
> >     <mailto:symfony-users%2bunsubscr...@googlegroups.com>
> >     For more options, visit this group at
> >    http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > С уважением,
> >     Александр Каупанин.
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it
> > to security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> - --
> Liip AG // Agile Web Development // T +41 26 422 25 11
> CH-1700 Fribourg // PGP 0xA581808B //www.liip.ch
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2rAJkACgkQqBnXnqWBgIv4zgCfSb+LVWF1LGQ2CVmWPkwHDWX9
> 2xIAnjwiYl6hlaoLNYZJukLAgRbT5zj3
> =APYk
> -----END PGP SIGNATURE-----

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to