* $a=$component->text; // equivalent to $a=$component->getText(); * $component->text='abc'; // equivalent to $component->setText('abc'); *
* // getter, defines a readable property 'text' * public function getText() { ... } * // setter, defines a writable property 'text' with $value to be set to the property * public function setText($value) { ... } *
* function eventHandler($event) { ... } *
* $component->onClick=$callback; // or $component->onClick->add($callback); *
* 'handleOnClick' // handleOnClick() is a global function * array($object,'handleOnClick') // using $object->handleOnClick() * array('Page','handleOnClick') // using Page::handleOnClick() *
* public function onClick($event) * { * $this->raiseEvent('onClick',$event); * } *
$event
* $value=$component->propertyName; * $handlers=$component->eventName; *
* $this->propertyName=$value; * $this->eventName=$callback; *
* array( * 'class'=>'path.to.BehaviorClass', * 'property1'=>'value1', * 'property2'=>'value2', * ) *
* function handlerName($event) {} *
* $component->getEventHandlers($eventName)->add($eventHandler); *
* $component->getEventHandlers($eventName)->insertAt(0,$eventHandler); *
* function foo($param1, $param2, ..., $component) { ... } *
* class TextAlign extends CEnumerable * { * const Left='Left'; * const Right='Right'; * } *