|
|
Provider
Provider modules are modules that provide services to other
modules. The module type constant is MODULE_PROVIDER. The available
API method is:
- string|array(string) query_provides()
-
returns the name of the service or services this module provides,
either as a string or as an array of strings.
Methods available to other modules are:
- object conf->get_provider( string service )
-
returns the provider module that handles the service service, or
one with highest priority if there are several. conf is the
configuration object for the virtual server.
- array(object) conf->get_providers( string service )
-
returns all provider modules that handle the service
service. conf is the configuration object for the virtual
server.
- void map_providers( string service, string fun, mixed
... args )
-
calls the method named fun in all modules providing the service
service. The method will be called with args as
arguments.
- mixed call_provider( string service, string fun, mixed
... args )
-
calls the method named fun in modules providing the service
service with the arguments args. Modules will get called
until one module returns a non zero value. That return value, or zero
if all modules returned zero, will be returned.
|
|