Files
yii/tests/framework/base/NewComponent.php
Carsten Brandt 23e32a79c6 added test for #1191
can not reproduce the issue
2012-12-12 16:39:18 +01:00

47 lines
781 B
PHP

<?php
class NewComponent extends CComponent
{
private $_object = null;
private $_text = 'default';
public $eventHandled = false;
public $behaviorCalled = false;
public function getText()
{
return $this->_text;
}
public function setText($value)
{
$this->_text=$value;
}
public function getObject()
{
if(!$this->_object)
{
$this->_object=new NewComponent;
$this->_object->_text='object text';
}
return $this->_object;
}
public function onMyEvent()
{
$this->raiseEvent('OnMyEvent',new CEvent($this));
}
public function myEventHandler($event)
{
$this->eventHandled=true;
}
public function exprEvaluator($p1,$comp) {
return "Hello $p1";
}
public function handler1() {}
public function handler2() {}
public function handler3() {}
}