HumHub Documentation (unofficial)

InvokableFactory
in package
implements FactoryInterface

FinalYes

Factory for instantiating classes with no dependencies or which accept a single array.

The InvokableFactory can be used for any class that:

  • has no constructor arguments;
  • accepts a single array of arguments via the constructor.

It replaces the "invokables" and "invokable class" functionality of the v2 service manager.

Table of Contents

Interfaces

FactoryInterface
Interface for a factory

Methods

__invoke()  : object
Create an object

Methods

__invoke()

Create an object

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

        
On this page

Search results