Skip to content

NamedPlugin

Opt-in for a plugin whose diagnostics/logging name can’t be a compile-time constant (e.g.

it’s computed from config, an environment value, or an instance the plugin was constructed with). Most plugins don’t need this — naming the plugin via Plugin’s name argument is enough. PluginManager prefers this interface’s NamedPlugin::name() over the attribute’s name when a plugin implements both.

interface NamedPlugin extends PluginInterface

ImplementsPluginInterface
SourcePlugin/NamedPlugin.php
MethodDescription
name(): stringA stable, human-readable identifier for diagnostics/logging.

abstract public function name(): string

A stable, human-readable identifier for diagnostics/logging.

Returns string

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
register()PluginInterfaceContribute to the framework.