XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
|
[Final] Used for the simple mechanism for common delegation in XCube. More...
Public Member Functions | |
__construct () | |
Constructor. | |
_setSignatures ( $args) | |
Set signatures for this delegate. | |
register ( $delegateName) | |
Registers this object to delegate manager of root. | |
add ( $callback, $param2=null, $param3=null) | |
[Overload] Connects functions to this object as callback functions | |
delete ( $delcallback) | |
Disconnects a function from this object. | |
reset () | |
Resets all delegate functions from this object. | |
call () | |
Calls connected functions of this object. | |
isEmpty () | |
Gets a value indicating whether this object has callback functions. | |
getID () | |
Data Fields | |
$_mSignatures = [] | |
Vector Array - The list of type of parameters. | |
$_mCallbacks = [] | |
Complex Array - This is Array for callback type data. | |
$_mHasCheckSignatures = false | |
bool | |
$_mIsLazyRegister = false | |
$_mLazyRegisterName | |
string - the registry name for lazy registration. | |
$_mUniqueID | |
[Final] Used for the simple mechanism for common delegation in XCube.
A delegate can have $callback as connected function, $filepath for lazy loading and $priority as order indicated.
\per 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 )
Definition at line 101 of file XCube_Delegate.class.php.
__construct | ( | ) |
Constructor.
The parameter of the constructor is a variable argument style to specify the signature of this delegate. If the argument is empty, signature checking doesn't work. Empty arguments are good to use in many cases. But, it is important to emphasize a delegate to make well-connected functions.
Definition at line 154 of file XCube_Delegate.class.php.
_setSignatures | ( | $args | ) |
Set signatures for this delegate.
$args | Array - std::vector<string> |
By this method, this function will check the arguments with the following signatures to call().
Definition at line 171 of file XCube_Delegate.class.php.
add | ( | $callback, | |
$param2 = null, | |||
$param3 = null ) |
[Overload] Connects functions to this object as callback functions
$callback | ||
null | $param2 | |
null | $param3 |
This method is a virtual overload by signatures.
Definition at line 224 of file XCube_Delegate.class.php.
call | ( | ) |
Calls connected functions of this object.
Definition at line 284 of file XCube_Delegate.class.php.
delete | ( | $delcallback | ) |
Disconnects a function from this object.
$delcallback |
Definition at line 254 of file XCube_Delegate.class.php.
getID | ( | ) |
Definition at line 374 of file XCube_Delegate.class.php.
isEmpty | ( | ) |
Gets a value indicating whether this object has callback functions.
Definition at line 363 of file XCube_Delegate.class.php.
register | ( | $delegateName | ) |
Registers this object to delegate manager of root.
string | $delegateName |
Definition at line 191 of file XCube_Delegate.class.php.
reset | ( | ) |
Resets all delegate functions from this object.
Definition at line 275 of file XCube_Delegate.class.php.
$_mCallbacks = [] |
Complex Array - This is Array for callback type data.
Definition at line 112 of file XCube_Delegate.class.php.
$_mHasCheckSignatures = false |
bool
Definition at line 118 of file XCube_Delegate.class.php.
$_mIsLazyRegister = false |
Definition at line 129 of file XCube_Delegate.class.php.
$_mLazyRegisterName |
string - the registry name for lazy registration.
Definition at line 135 of file XCube_Delegate.class.php.
$_mSignatures = [] |
Vector Array - The list of type of parameters.
Definition at line 106 of file XCube_Delegate.class.php.
$_mUniqueID |
Definition at line 140 of file XCube_Delegate.class.php.