PluginManagerInterface
extends
ServiceLocatorInterface
in
Interface for a plugin manager
A plugin manager is a specialized service locator used to create homogeneous objects
Table of Contents
- build() : mixed
- Build a service by its name, using optional options (such services are NEVER cached).
- get() : mixed
- Finds an entry of the container by its identifier and returns it.
- has() : bool
- Returns true if the container can return an entry for the given identifier.
- validate() : void
- Validate an instance
Methods
build()
Build a service by its name, using optional options (such services are NEVER cached).
public
build(string $name[, null|array<string|int, mixed> $options = null ]) : mixed
Parameters
- $name : string
- $options : null|array<string|int, mixed> = null
Tags
Return values
mixed —get()
Finds an entry of the container by its identifier and returns it.
public
get(string $id) : mixed
Parameters
- $id : string
-
Identifier of the entry to look for.
Tags
Return values
mixed —Entry.
has()
Returns true if the container can return an entry for the given identifier.
public
has(string $id) : bool
Returns false otherwise.
has($id)
returning true does not mean that get($id)
will not throw an exception.
It does however mean that get($id)
will not throw a NotFoundExceptionInterface
.
Parameters
- $id : string
-
Identifier of the entry to look for.
Return values
bool —validate()
Validate an instance
public
validate(object $instance) : void
Parameters
- $instance : object