|
| __construct () |
| Constructor.
|
|
| register ( $name, &$delegate) |
| Adds $delegate as Delegate to the list of this manager.
|
|
| add (string $name, $callback, $param3=null, $param4=null) |
| Connects functions to the delegate that have the specified name.
|
|
| delete (string $name, $delcallback) |
| Disconnects a function from the delegate that have the specified name.
|
|
| reset (string $name) |
| Resets all functions off the delegate that have the specified name.
|
|
| isEmpty (string $name) |
| Gets a value indicating whether the specified delegate has callback functions.
|
|
| getDelegates () |
|
Manager for delegates.
This is the agent of un-registered delegate objects. Usually, connected functions can't be added to un-registered delegates. When destination delegates are not yet registered, this handler retains these functions and settings until the destination delegate is registered. In other words, this class performs lazy delegate registration.
register |
( |
| $name, |
|
|
& | $delegate ) |
Adds $delegate as Delegate to the list of this manager.
- Parameters
-
string | $name | - Registration name. |
XCube_Delegate | $delegate | - Delegate object which will be registered. |
- Returns
- bool
If some functions that want to connect to $delegate, have not yet been assigned, this object calls add() of $delegate with their parameters.
Usually this member function isn't used as Cube's API by developers. In many cases, XCube_Delegate\register() calls this.