## Apache Zeta Components Manual :: Docs For Class ezcWebdavPluginRegistry

### Webdav::ezcWebdavPluginRegistry

### Class ezcWebdavPluginRegistry

Global plugin registry class.

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.

Source for this file: /Webdav/src/plugin_registry.php

Version: | //autogen//

### Method Summary

public void | `__construct( )` Creates a new plugin registry.
public void | `announceHook( $class , $hook , $params )` Announces the given hook.
public ezcWebdavPluginConfiguration | `getPluginConfig( $namespace )` Returns a plugins configuration object.
public bool | `hasPlugin( $namespace )` Returns if a plugin is active in the server.
public void | `initPlugins( )` Initializes all registered plugins.
public void | `registerPlugin( $config )` Registers a new plugin to be used.
public void | `unregisterPlugin( $config )` Can be used to deactivate a plugin.

### Methods

#### __construct

void __construct( )

Creates a new plugin registry.

#### announceHook

void announceHook( string $class , string $hook , ezcWebdavPluginParameters $params )

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:

Name | Type | Description
--- | --- | ---
`$class` | string |
`$hook` | string |
`$params` | ezcWebdavPluginParameters |

##### Exceptions:

Type | Description
--- | ---
`ezcWebdavPluginFailureException` | in case a plugin threw an exception. The original one can be accessed for processing through the public $originalException attribute.

#### getPluginConfig

ezcWebdavPluginConfiguration getPluginConfig( string $namespace )

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.

This method calls the ezcWebdavPluginConfiguration::init() method for each registered plugin. The method is marked as private, because it is not intended for external use, but may only be called from ezcWebdavServer.

#### registerPlugin

void registerPlugin( ezcWebdavPluginConfiguration $config )

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:

Name | Type | Description
--- | --- | ---
`$config` | ezcWebdavPluginConfiguration |

##### Exceptions:

Type | Description
--- | ---
`ezcWebdavPluginDoubleRegistrationException` | if the namespace of a plugin is registered twice.

#### unregisterPlugin

void unregisterPlugin( ezcWebdavPluginConfiguration $config )

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:

Name | Type | Description
--- | --- | ---
`$config` | ezcWebdavPluginConfiguration |

Documentation generated by phpDocumentor 1.4.3