ZMObject
public class ZMObject
| Field Summary | |
|---|---|
| protected mixed | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| 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 all custom properties. |
| array | getPropertyNames(boolean customOnly) Get a list of all properties. |
| void | set(string name, mixed value) Support to set property values by name. |
| protected static mixed | singleton(string name, string instance, boolean force) Get a singleton instance of the named class. |
protected mixed $properties_
public void __construct()
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 getProperties()
Get all custom properties.
public array getPropertyNames(boolean customOnly)
Get a list of all properties.
true.public void set(string name, mixed value)
Support to set property values by name.
protected static mixed singleton(string name, string instance, boolean force)
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).