trait PluginConsumer (View source)

Allows adding, loading, and sorting of plugins

Methods

addPlugin(string $pluginName, array $config = [])

No description

removePlugin(string $pluginName)

No description

mergePlugins(array $plugins)

No description

setPlugins(array $plugins)

No description

setDefaultPlugins(array $plugins)

No description

array
getPlugins(bool $inheritDefaults = true)

No description

array
getDefaultPlugins()

No description

bool
hasPlugin(string $identifier)

No description

loadPlugins()

Translates all the ID and config settings to first class instances

array
getSortedPlugins()

Sorts the before/after of plugins using topological sort

Details

PluginConsumer addPlugin(string $pluginName, array $config = [])

Parameters

string $pluginName
array $config

Return Value

PluginConsumer

PluginConsumer removePlugin(string $pluginName)

Parameters

string $pluginName

Return Value

PluginConsumer

PluginConsumer mergePlugins(array $plugins)

Parameters

array $plugins

Return Value

PluginConsumer

PluginConsumer setPlugins(array $plugins)

Parameters

array $plugins

Return Value

PluginConsumer

Exceptions

SchemaBuilderException

PluginConsumer setDefaultPlugins(array $plugins)

Parameters

array $plugins

Return Value

PluginConsumer

Exceptions

SchemaBuilderException

array getPlugins(bool $inheritDefaults = true)

Parameters

bool $inheritDefaults

Return Value

array

array getDefaultPlugins()

Return Value

array

bool hasPlugin(string $identifier)

Parameters

string $identifier

Return Value

bool

PluginRegistry getPluginRegistry()

Return Value

PluginRegistry

Generator loadPlugins()

Translates all the ID and config settings to first class instances

Return Value

Generator

Exceptions

SchemaBuilderException
CircularDependencyException
ElementNotFoundException

array getSortedPlugins()

Sorts the before/after of plugins using topological sort

Return Value

array

Exceptions

CircularDependencyException
ElementNotFoundException