Plugin
class Plugin implements AnnotationInterface (View source)
Defines a Plugin annotation object.
Annotations in plugin classes can use this class in order to pass various metadata about the plugin through the parser to DiscoveryInterface::getDefinitions() calls. This allows the metadata of a class to be located with the class itself, rather than in module-based info hooks.
Properties
| protected array | $definition | The plugin definition read from the class annotation. |
Methods
Constructs a Plugin object.
Parses an annotation into its definition.
Gets the value of an annotation.
Gets the name of the provider of the annotated class.
Sets the name of the provider of the annotated class.
Gets the unique ID for this annotated class.
Gets the class of the annotated class.
Sets the class of the annotated class.
Details
__construct($values)
Constructs a Plugin object.
Builds up the plugin definition and invokes the get() method for any classed annotations that were used.
protected array
parse(array $values)
Parses an annotation into its definition.
get()
Gets the value of an annotation.
string
getProvider()
Gets the name of the provider of the annotated class.
setProvider(string $provider)
Sets the name of the provider of the annotated class.
string
getId()
Gets the unique ID for this annotated class.
string
getClass()
Gets the class of the annotated class.
setClass(string $class)
Sets the class of the annotated class.