FileAccess Orion

FactoryInterface

Interface for a factory

A factory is an callable object that is able to create an object. It is given the instance of the service locator, the requested name of the class you want to create, and any additional options that could be used to configure the instance state.

Table of Contents

__invoke()  : object
Create an object

Methods

__invoke()

Create an object

public __invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
$container : ContainerInterface
$requestedName : string
$options : null|array<string|int, mixed> = null
Tags
throws
ServiceNotFoundException

if unable to resolve the service.

throws
ServiceNotCreatedException

if an exception is raised when creating a service.

throws
ContainerException

if any other error occurs

Return values
object

Search results