\Phile\PluginPluginRepository

Class PluginRepository manages plugin loading

Summary

Methods
Properties
Constants
__construct()
addDirectory()
load()
No public properties found
No constants found
loadSingle()
$directories
$eventBus
N/A
No private methods found
No private properties found
N/A

Properties

$directories

$directories :array

Type

array—array of \Phile\Plugin\PluginDirectory

Methods

__construct()

__construct(\Phile\Core\Event  $eventBus)

Parameters

\Phile\Core\Event $eventBus

addDirectory()

addDirectory(string  $directory): self

Adds plugin directory to repository

Parameters

string $directory

path to plugin-directory

Returns

self

load()

load(\Phile\Core\Config  $config)

Loads all plug-ins

Parameters

\Phile\Core\Config $config

phile config with plugin config

Throws

\Phile\Plugin\Exception\PluginException

loadSingle()

loadSingle(string  $pluginKey,\Phile\Core\Config  $config): \Phile\Plugin\AbstractPlugin

Loads and returns single plugin

Parameters

string $pluginKey

plugin key e.g. 'phile\errorHandler'

\Phile\Core\Config $config

Throws

\Phile\Exception\PluginException

Returns

\Phile\Plugin\AbstractPlugin

Plugin class