This class represents a single plugin with all it's options and properties.

category phpDocumentor
package Plugin
author Mike van Riel
license MIT
link http://phpdoc.org

 Methods

Translates the ID or message in the given language.

_(string $message, array $variables) : string
Inherited

Translation messages may contain any formatting as used by the php vsprintf function.

inherited_from \phpDocumentor_Plugin_Abstract::_()

Parameters

$message

string

ID or message to translate.

$variables

array

Variables to use for substitution.

Returns

string

Initialize this object with an Event Dispatcher and Configuration object.

__construct(\sfEventDispatcher $event_dispatcher, \Zend_Config_Xml $configuration, \Zend_Translate_Adapter_Array $translator) 
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::__construct()

Parameters

$event_dispatcher

\sfEventDispatcher

Dispatcher used to handle events.

$configuration

\Zend_Config_Xml

Configuration object for this object.

$translator

\Zend_Translate_Adapter_Array

Translator object.

Dispatches a logging request to log a debug message.

debug(string $message) : void
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::debug()

Parameters

$message

string

The message to log.

Dispatches an event to the Event Dispatcher.

dispatch(string $name, \string[] $arguments) : mixed | null
Inherited

This method tries to dispatch an event; if no Event Dispatcher has been set than this method will explicitly not fail and return null. By not failing we make the Event Dispatcher optional and is it easier for people to re-use this component in their own application.

inherited_from \phpDocumentor_Plugin_Abstract::dispatch()

Parameters

$name

string

Name of the event to dispatch.

$arguments

\string[]

Arguments for this event.

Exceptions

\phpDocumentor_Parser_Exception if there is a dispatcher but it is not of type sfEventDispatcher

Returns

mixednull

Returns the configuration for this object.

getConfiguration() : \Zend_Config_Xml
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::getConfiguration()

Returns

Returns the event dispatcher.

getEventDispatcher() : \sfEventDispatcher
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::getEventDispatcher()

Returns

Return the options that have been set

getOptions() : array

Returns

array

Returns the translation component.

getTranslator() : \Zend_Translate_Adapter_Array | null
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::getTranslator()

Returns

Loads the plugin's definition from the given XML configuration file.

load(string $file, \Composer\Autoload\ClassLoader | null $autoloader) : void

If the autoloader is provided then the class' prefix is added to it.

Parameters

$file

string

Path to the configuration file.

$autoloader

\Composer\Autoload\ClassLoadernull

Autoloader object to add the prefix/path combination to.

Dispatches a logging request.

log(string $message, int $priority) : void
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::log()

Parameters

$message

string

The message to log.

$priority

int

The logging priority, the lower, the more important. Ranges from 1 to 7

Dispatches a parser error to be logged.

logParserError(string $type, $code, string $line, \string[] $variables) : void
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::logParserError()

Parameters

$type

string

The logging priority as string

$code

$line

string

The line number where the error occurred..

$variables

\string[]

an array with message substitution variables.

 Properties

 

<p>Author's full name</p>

$author : string

 

<p>The prefix for the classes in this plugin</p>

$class_prefix : string

 

<p>Configuration object for plugins</p>

$configuration : \Zend_Config_Xml
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::$$configuration
 

<p>list of names of plugins which this depends on</p>

$dependencies : \string[]

 

<p>Description for this plugin</p>

$description : string

 

<p>E-mail address of the author or for support</p>

$email : string

 

<p>Dispatcher used to send events back and forth</p>

$event_dispatcher : \sfEventDispatcher
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::$$event_dispatcher
 

<p>a list of listener classes to register</p>

$listeners : \string[]

 

<p>name of the plugin, must be unique in phpDocumentor</p>

$name : string

 

<p>associative array with options</p>

$options : \string[]

 

<p>Translation object</p>

$translate : \Zend_Translate_Adapter_Array
Inherited

inherited_from \phpDocumentor_Plugin_Abstract::$$translate
 

<p>version number according to semantic versioning, i.e. 1.0.0</p>

$version : string

 

<p>Website where to get more info for this plugin</p>

$website : string