Behaviors & events

Comparing #3 with #4

Revision #4 was created by Lensi Lensi on Mar 30, 2011, 7:30:05 AM.

Was missing the word 'to'

Content

[...]
```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.
[...]