Difference between #3 and #4 of
Behaviors & events

Revision #4 has been created by Lensi on Mar 30, 2011, 7:30:05 AM with the memo:

Was missing the word 'to'
« previous (#3) next (#5) »

Changes

Title unchanged

Behaviors & events

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

[...]
```php
$test_comp->onSomethingGoesOn(new CEvent($this));
$test_comp->onSomethingGoesOn(new CEvent());
```

So, basically, it allows you
to build a list of function calls that can later be executed, in the order they were added. It can save you passing around a lot of object refs and building conditional code, since you can still raise the event, even if it doesn't do anything.

##Behaviors

Behaviors are simply a way of adding methods to an object.
[...]
43 0
48 followers
Viewed: 134 893 times
Version: 1.1
Category: Tutorials
Tags:
Written by: pestaa
Last updated by: Gismo
Created on: Aug 24, 2009
Last updated: 5 years ago
Update Article

Revisions

View all history