Public Member Functions | |
register ($name, &$delegate) | |
add ($name, $callback, $param3=null, $param4=null) | |
delete ($name, $delcallback) | |
reset ($name) | |
getDelegates () |
In other words, this class realizes lazy delegate registering.
XCube_DelegateManager::register | ( | $ | name, | |
&$ | delegate | |||
) |
Add $delegate as Delegate to the list of this manager. If some functions that want to connect to $delegate, have been entrusted yet, 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.
public
XCube_DelegateManager::add | ( | $ | name, | |
$ | callback, | |||
$ | param3 = null , |
|||
$ | param4 = null | |||
) |
Connect any functions to the delegate that have the specified name. If there aren't any delegates that have the specified name, this manager entrust parameters to member properties. Then, when the delegate that have the specified name will be registered, this manager will set these parameters to the delegate.
public
$name | register name |
XCube_DelegateManager::delete | ( | $ | name, | |
$ | delcallback | |||
) |
Disconnect a function from the delegate that have the specified name.
public
$name | register name |
XCube_DelegateManager::reset | ( | $ | name | ) |
Reset all functions off the delegate that have the specified name.
public
XCube_DelegateManager::getDelegates | ( | ) |
public