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 1
January 31, 2012 @ 11:19:47

On PHPMaster.com today Steven O'Brien takes a look at a popular PHP-based framework, Yii - specifically one of the components that makes it up, the CComponent that provides a base for all other components in the framework.

There's been a lot of buzz surrounding the use of frameworks for quite a while now and there are many great PHP frameworks to choose from. I was blown away by the simplicity and power of the base CComponent class in the Yii framework. [...] Every class in the framework extends from the CComponent class, which means that all subclasses work as components and can raise and handle events as well as be reusable and configurable. This packs a lot of punch for such a little class!

In this first post of the series, he looks at how this base class lets you work with class properties using the magic getters and setters. He includes some code showing how to set them up and how to use it to configure your object by passing in other component and their configuration.

0 comments voice your opinion now!
yii component tutorial ccomponent class introduction framework


blog comments powered by Disqus

Similar Posts

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 6)

DevShed: Working with MySQL Result Sets and the Decorator Pattern in PHP

Ajax Magazine: Claw, PHP5 MVC Framework Ajaxified

SitePoint PHP Blog: Asset Access Restriction Methods Block Unwanted Visitors

ZendCasts.com: Deep Integration between Zend and Doctrine 1.2


Community Events

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


php7 xdebug performance laravel release example podcast voicesoftheelephpant symfony2 interview extension community version library framework series introduction conference api opinion

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