Skip to content
docs

PluginsManagerInterface

Discovers, registers, and boots the plugins that make up the running application.

PluginsManagerInterface::addPluginPath()

abstract public function addPluginPath(string $path): void

Registers a directory to be scanned for plugins. No-op if the path was already registered.

Parameters

Parámetros de addPluginPath()
NombreTipoDescripción
$pathstring

PluginsManagerInterface::loadPlugins()

abstract public function loadPlugins(): void

Discovers plugins under the registered paths, instantiates the enabled ones through the container, and boots them.

PluginsManagerInterface::getToolProviderPromptSections()

abstract public function getToolProviderPromptSections(): array

Get prompt sections from all plugins implementing ToolProviderInterface.

PluginsManagerInterface::getPlugins()

abstract public function getPlugins(): array

Returns all booted plugin instances, keyed by plugin name.

PluginsManagerInterface::getPlugin()

abstract public function getPlugin(string $name): ?Milpa\app\Interfaces\Plugin\PluginInterface

Returns a single booted plugin instance by name, or null if no such plugin has been booted.

Parameters

Parámetros de getPlugin()
NombreTipoDescripción
$namestring

PluginsManagerInterface::isEnabled()

abstract public function isEnabled(string $name): bool

Whether the given plugin name is currently enabled.

Parameters

Parámetros de isEnabled()
NombreTipoDescripción
$namestring