News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gonzalo Ayuso:
Using the event dispatcher in a Silex application
October 14, 2013 @ 13:03:26

Gonzalo Ayuso has a new post today showing you how to use the Symfony event dispatcher in a Silex-based application. His example involves a simple image processing example.

Symfony has one component called The Event Dispatcher. This component is one implementation of Mediator pattern and it's widely used in modern frameworks, such as Symfony. Silex, as a part of Symfony, also uses this component and we can easily use it in our projects.

His example creates a Silex endpoint that creates an image with a given string. He notes that handling it all at once and then unlinking at the end of the request is one way to handle it. The other is to use the event dispatcher to add an event lister (as a closure) to happen "on terminate" to unlink the path it's been given.

0 comments voice your opinion now!
event dispatcher symfony2 silex image generate

Link: http://gonzalo123.com/2013/10/14/using-the-event-dispatcher-in-a-silex-application/

blog comments powered by Disqus

Similar Posts

Test.ical.ly Blog: PHP 5.3 and the Symfony2 UniversalClassLoader - Where to load?

Symfony-framework.com: Symfony 1.1 - What’s new?

Fabien Potencier's Blog: Create your own framework...on top of the Symfony2 Components (parts 3 & 4)

Community News: KenRadio.com Site Hacked (uses PHP-Nuke)

Lukas Smith's Blog: Symfony2 stuff


Community Events

Don't see your event here?
Let us know!


opinion laravel configure part2 community composer php7 introduction framework series language podcast symfony2 interview conference example performance api application release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework