Menu

## MutableDefinitionSource extends DefinitionSource
in

MutableDefinitionSource.php : 14

Describes a definition source to which we can add new definitions.

##### Tags

author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Methods

addDefinition() : void
getDefinition() : Definition|null
  Returns the DI definition for the entry name.
getDefinitions() : array<string, Definition>

### Methods

#### addDefinition()

MutableDefinitionSource.php : 16
`public addDefinition(Definition $definition) : void`

##### Parameters

$definition : Definition

#### getDefinition()

DefinitionSource.php : 22

Returns the DI definition for the entry name.

`public getDefinition(string $name) : Definition|null`

##### Parameters

$name : string

##### Tags

throws
  InvalidDefinition

  An invalid definition was found.

##### Return values

Definition|null

#### getDefinitions()

DefinitionSource.php : 27
`public getDefinitions() : array<string, Definition>`

##### Return values

array<string, Definition> —

Definitions indexed by their name.

## Search results