Webdav: ezcWebdavPluginRegistry
[ ]
[ Clients ] [ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavPluginRegistry
|
Global plugin registry class. [
source]
An instance of this class is request wide uniquely responsible for handling plugins to the Webdav component. It has a number of different hooks available of the server and transport layer of the component to allow plugins to interact and integrate with these layers to add extended funtionality.
A good overview of the working of the plugin system can be found in its design document Webdav/design/extensibility.txt.
Method Summary
Methods
__construct
void __construct(
)
Creates a new plugin registry.
announceHook
Announces the given hook.
This class may only be used by
ezcWebdavServer and
ezcWebdavTransport to announce the reaching of a hook. Therefore, this method is marked private. Receives the name of the class issuing the $hook and the $params that may be used for information extraction and _careful_ possible manipulation.
This method is declared private, because the announcement of hooks is only allowed by component internal classes.
Parameters
Throws
| Class | Description |
ezcWebdavPluginFailureException |
in case a plugin threw an exception. The original one can be accessed for processing through the public $originalException attribute. |
getPluginConfig
Returns a plugins configuration object.
Returns the instance of
ezcWebdavPluginConfiguration used for the plugin with a given $namespace. Throws an exception, if the plugin was not found.
Parameters
| Name |
Type |
Description |
$namespace |
string |
|
hasPlugin
bool hasPlugin(
string
$namespace )
Returns if a plugin is active in the server.
Checks if a configuration with the given $namespace exists and returns this information as a boolean value.
Parameters
| Name |
Type |
Description |
$namespace |
string |
|
initPlugins
void initPlugins(
)
Initializes all registered plugins.
registerPlugin
Registers a new plugin to be used.
Receives an instance of
ezcWebdavPluginConfiguration, which is possible extended for internal use in the plugin. The 'namespace' property of this class is used to register it internally. Multiple registrations of the same namespace will lead to an exception.
Parameters
Throws
| Class | Description |
ezcWebdavPluginDoubleRegistrationException |
if the namespace of a plugin is registered twice. |
unregisterPlugin
Can be used to deactivate a plugin.
Receives an instance of
ezcWebdavPluginConfiguration, which is possible extended for internal use in the plugin. The 'namespace' property of this class is used to unregister it internally. Unregistration of a notregistered $config object will be silently ignored.
Parameters
Last updated: Mon, 30 Mar 2009