FileAccess Orion

PluginManagerInterface extends ServiceLocatorInterface

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
throws
ServiceNotFoundException

If no factory/abstract factory could be found to create the instance.

throws
ServiceNotCreatedException

If factory/delegator fails to create the instance.

throws
ContainerExceptionInterface

if any other error occurs

Return values
mixed

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
Tags
throws
InvalidServiceException

If created instance does not respect the constraint on type imposed by the plugin manager

throws
ContainerException

if any other error occurs

Return values
void

Search results