Menu

## FactoryInterface
in

FactoryInterface.php : 15

Describes the basic interface of a factory.

##### Tags

since
  4.0
author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Methods

make() : mixed
  Resolves an entry by its name. If given a class name, it will return a new instance of that class.

### Methods

#### make()

FactoryInterface.php : 29

Resolves an entry by its name. If given a class name, it will return a new instance of that class.

`public make(string $name[, array<string|int, mixed> $parameters = [] ]) : mixed`

##### Parameters

$name : string

  Entry name or a class name.

$parameters : array<string|int, mixed> = []

  Optional parameters to use to build the entry. Use this to force specific parameters to specific values. Parameters not defined in this array will be automatically resolved.

##### Tags

throws
  InvalidArgumentException

  The name parameter must be of type string.

throws
  DependencyException

  Error while resolving the entry.

throws
  NotFoundException

  No entry or class found for the given name.

## Search results