Utility class which collects utility functions for delegates.
More...
|
| __construct () |
| Private Construct. In other words, it's possible to create an instance of this class.
|
|
Utility class which collects utility functions for delegates.
XCube_DelegateUtils\call("Delegate Name"[, function args...]);
XCube_DelegateUtils\raiseEvent("Event Name"[, function params...]);
$string = XCube_DelegateUtils\applyStringFilter("Filter Name", $string, [, option params...]);
◆ _compareCallback()
static _compareCallback |
( |
| $callback1, |
|
|
| $callback2 ) |
|
static |
◆ applyStringFilter()
static applyStringFilter |
( |
| ) |
|
|
static |
- Parameters
-
1st | string - Delegate Name |
2nd | string |
3rd | and more - Optional function parameters |
- Returns
- string
◆ raiseEvent()
[Static] Utility method for calling event-delegates.
- Parameters
-
1st | Delegate Name |
2nd | and more : Delegate function parameters |
- Returns
- bool
- Deprecated
- Use call()
This method is a shortcut for calling delegates without actual delegate objects. If there is not the delegate specified by the 1st parameter, the delegate will be made right now. Therefore, this method is helpful for events.
- Note
static raiseEvent()
[Static] Utility method for calling event-delegates.
Definition XCube_Delegate.class.php:639
The upper code equals the following code;
{
$local->register("Module.A.Exception.Null");
$local->call();
}
[Final] Used for the simple mechanism for common delegation in XCube.
Definition XCube_Delegate.class.php:101
- Attention
- Only event-owners should use this method. Outside program never calls other's events. This is a kind of XCube_Delegate rules. There is the following code;
ClassA::check()
{
if ($this->mThing == null)
}
In this case, another class never calls the event.
$obj = new ClassA();
if ($obj->mThing == null)
Other classes may call only ClassA::check();
The documentation for this class was generated from the following file:
- C:/Ampps/www/legacy250/html/core/XCube_Delegate.class.php