Inheritance diagram for XCube_Delegate:
Public Member Functions | |
XCube_Delegate () | |
_setSignatures ($args) | |
register ($delegateName) | |
add ($callback, $param2=null, $param3=null) | |
delete ($delcallback) | |
reset () | |
call () | |
Public Attributes | |
$_mLazyRegisterName = null |
A delegate can have $callback as connected function, $filepath for lazy loading and $priority as order indicated.
"Priority" Default of this parameter is XCUBE_DELEGATE_PRIORITY_NORMAL. Usually, this parameter isn't specified. Plus, the magic number should be used to specify priority. Use XCUBE_DELEGATE_PRIORITY_FIRST or XCUBE_DELEGATE_PRIORITY_FINAL with Addition and Subtraction. (e.x. XCUBE_DELEGATE_PRIORITY_NORMAL - 1 )
[Notice] This is the candidate as new delegate style, which has foolish name to escape conflict with old XCube_Delegate. After replacing, we'll change all.
XCube_Delegate::XCube_Delegate | ( | ) |
Constructor. The parameter of the constructor is a variable argument style to specify the sigunature of this delegate. If the argument is empty, signature checking doesn't work. Empty arguments are good to use in many cases. But, that's important to accent a delegate for making rightly connected functions.
[Sample] $delegate =& new XCube_Delegate("string", "string");
XCube_Delegate::_setSignatures | ( | $ | args | ) |
Set signatures for this delegate. By this member function, this function will come to check arguments with following signatures at call().
privated
$args | array |
XCube_Delegate::register | ( | $ | delegateName | ) |
Register this object to delegate manager of root.
public
$delegateName | string |
XCube_Delegate::add | ( | $ | callback, | |
$ | param2 = null , |
|||
$ | param3 = null | |||
) |
Connect any functions to this object. This member function is virtual overload by sigunatures.
add(callback $callback, int priority = XCUBE_DELEGATE_PRIORITY_NORMAL); add(callback $callback, string filepath = null); add(callback $callback, int priority =... , string filepath=...);
public
XCube_Delegate::delete | ( | $ | delcallback | ) |
Disconnect a function from this object. public
XCube_Delegate::reset | ( | ) |
Reset all delegate functions from this object. public
XCube_Delegate::call | ( | ) |
Call connected functions.
public
XCube_Delegate::$_mLazyRegisterName = null |
This is register name for lazy registering.