Class DibiObject
DibiObject is the ultimate ancestor of all instantiable classes.
DibiObject is copy of Nette\Object from Nette Framework (http://nettephp.com).
It defines some handful methods and enhances object core of PHP:
- access to undeclared members throws exceptions
- support for conventional properties with getters and setters
- support for event raising functionality
- ability to add new methods to class (extension methods)
Event functionality is provided by declaration of property named 'on{Something}' Multiple handlers are allowed.
Adding method to class (i.e. to all instances) works similar to JavaScript prototype property. The syntax for adding a new method is:
Direct Known Sub-classes:
| Method Summary | |
|---|---|
| static mixed |
extensionMethod
(string $name, [mixed $callback =
NULL])
Adding method to class.
|
| string |
getClass
()
Returns the name of the class of this object.
|
| \ReflectionObject |
Access to reflection.
|
| mixed |
__call
(string $name, array $args)
Call to undefined method.
|
| static mixed |
__callStatic
(string $name, array $args)
Call to undefined static method.
|
| & mixed |
__get
(string $name)
Returns property value. Do not call directly.
|
| bool |
__isset
(string $name)
Is property defined?
|
| void |
__set
(string $name, mixed $value)
Sets value of a property. Do not call directly.
|
| void |
__unset
(string $name)
Access to undeclared property.
|
| Method Details | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 151 extensionMethodpublic static mixed extensionMethod (string $name, [mixed $callback = Adding method to class.
|
|||||||||||||||||||||
|
line 67 getClasspublic string getClass () Returns the name of the class of this object.
|
|||||||||||||||||||||
|
line 78 getReflectionpublic \ReflectionObject getReflection () Access to reflection.
|
|||||||||||||||||||||
|
line 92 __callpublic mixed __call (string $name, array $args) Call to undefined method. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 137 __callStaticpublic static mixed __callStatic (string $name, array $args) Call to undefined static method.
|
|||||||||||||||||||||
|
line 213 __getpublic mixed & __get (string $name) Returns property value. Do not call directly.
|
|||||||||||||||||||||
|
line 284 __issetpublic bool __isset (string $name) Is property defined?
|
|||||||||||||||||||||
|
line 251 __setpublic void __set (string $name, mixed $value) Sets value of a property. Do not call directly.
|
|||||||||||||||||||||
|
line 298 __unsetpublic void __unset (string $name) Access to undeclared property.
|
|||||||||||||||||||||