News Feed
Sections




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

PHPMaster.com:
Under the Hood of Yii's Component Architecture, Part 2
February 07, 2012 @ 11:53:57

Following up on their previous look at the component architecture of the Yii framework, PHPMaster has posted this new tutorial showing how the framework allows you to do some event-based programming.

An application event is something that occurs which might be of interest to other bits of code. A standard event in most GUI applications would be a "click" event, but the sky's the limit and what events you define is really up to you. [...] The details can be provided by application-specific modules allowing you to keep individual requirements separate from your reusable code. Events allow you to attach a potentially unlimited amount of functionality without changing your core modules and components.

In his example, he shows how to create an event handler that is triggered when the user registers on the site. This event (CEvent) is then registered with the system and is attached via a call in the controller's "init" method.

0 comments voice your opinion now!
yii component tutorial introduction framework event attach trigger


blog comments powered by Disqus

Similar Posts

MaltBlue.com: \Zend\Db\Sql - Creating Joins and Unions with Ease

Dev-Explorer.com: Using MySQL Stored Procedures and Extending MySQLi in PHP

Zend Developer Zone: Integrating Propel with the Zend Framework

Christoph Dorn's Blog: Zend Server + FirePHP on AWS

Mike Purcell's Blog: PHP - Reflection Class - Determine Parent Method Signature


Community Events





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


interview framework unittest introduction testing developer configure laravel opinion refactor series threedevsandamaybe code list release community install symfony2 podcast language

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