Public Member Functions | |
| bind ($request, $service, $overwrite=false) | |
| setDefault ($service) | |
| unbind ($request) | |
| rebind ($request, $service) | |
| serve ($request) | |
| serveDefault () | |
Static Public Member Functions | |
| static | getInstance ($initConfig=null) |
Data Fields | |
| const | DISPATCHER_DEFAULT_SERVICE = 'DISPATCHER_DEFAULT_SERVICE' |
Private Member Functions | |
| __construct ($initConfig=null) | |
Private Attributes | |
| $registry | |
Static Private Attributes | |
| static | $_instance = false |
Service dispatcher Receive a requested service identifier and executes the corresponding service. Dispatcher is like a routing table.
Definition at line 137 of file service.lib.php.
| __construct | ( | $ | initConfig = null |
) | [private] |
Constructor
| initConfig | array initial services array |
Definition at line 153 of file service.lib.php.
| bind | ( | $ | request, | |
| $ | service, | |||
| $ | overwrite = false | |||
| ) |
Bind a service to a service identifier
| request | string service identifier | |
| service | Service service object | |
| overwrite | boolean overwrites an existing entry with the same identifier |
Definition at line 183 of file service.lib.php.
| static getInstance | ( | $ | initConfig = null |
) | [static] |
Definition at line 165 of file service.lib.php.
| rebind | ( | $ | request, | |
| $ | service | |||
| ) |
Rebind a service to a service identifier, same as Dispatcher::bind() with $overwrite set to true
| request | string service identifier | |
| service | Service service object |
Definition at line 232 of file service.lib.php.
| serve | ( | $ | request | ) |
Run the service corresponding to the given identifier
| request | string service identifier |
Definition at line 242 of file service.lib.php.
| serveDefault | ( | ) |
Run the default service
Definition at line 261 of file service.lib.php.
| setDefault | ( | $ | service | ) |
Bind the default service
| service | Service service object |
Definition at line 201 of file service.lib.php.
| unbind | ( | $ | request | ) |
Unbind the service corresponding to the given service identifier
| request | string service identifier |
Definition at line 211 of file service.lib.php.
$_instance = false [static, private] |
Definition at line 141 of file service.lib.php.
$registry [private] |
Bind table private
Definition at line 147 of file service.lib.php.
Definition at line 139 of file service.lib.php.
1.6.3