ZMObject
public class ZMObject
| Field Summary | |
|---|---|
| protected mixed | |
| Constructor Summary | |
|---|---|
ZMObject() Create new instance. |
|
| Method Summary | |
|---|---|
| static void | attachMethod(string method, string className, mixed target) Attach a dynamic method to objects. |
| mixed | get(string name, mixed default) Support to access property values by name. |
| void | getAttachedMethods(array List) Get all attached methods for this instance. |
| array | Get a list of all custom properties. |
| void | set(string name, mixed value) Support to set property values by name. |
| protected static mixed | singleton(string name, string instance) Get a singleton instance of the named class. |
protected mixed $properties_
public ZMObject()
Create new instance. /
public static void attachMethod(string method, string className, mixed target)
Attach a dynamic method to objects.
Target functions/methods have the following signature: ($ref, ...). $ref is
the current instance ($this), and the remaining arguments are the actual call parameter.
public mixed get(string name, mixed default)
Support to access property values by name.
null.null.public void getAttachedMethods(array List)
Get all attached methods for this instance.
public array getPropertyNames()
Get a list of all custom properties.
public void set(string name, mixed value)
Support to set property values by name.
protected static mixed singleton(string name, string instance)
Get a singleton instance of the named class.
ZenMagick base class.
This is the base class for all ZenMagick classes and contains some very basic stuff that might be usefull for most/all classes.
Included is generic support for properties via
get($name),set($name, $value)and, via the corresponding methods__get($name)and__set($name,$value).