mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-03 23:04:04 +01:00
22 lines
369 B
PHP
22 lines
369 B
PHP
<?php
|
|
|
|
/**
|
|
* Used in CBehaviorTest
|
|
*/
|
|
class TestBehavior extends CBehavior
|
|
{
|
|
public function events()
|
|
{
|
|
return array(
|
|
'onTestEvent' => 'handleTest',
|
|
);
|
|
}
|
|
|
|
public function handleTest($event)
|
|
{
|
|
if (!($event instanceof CEvent)) {
|
|
throw new CException('event has to be instance of CEvent');
|
|
}
|
|
$this->owner->behaviorEventHandled++;
|
|
}
|
|
} |