Documentation

ObjectDefinition
in package
implements Definition

Defines how an object can be instantiated.

Tags
author

Matthieu Napoli matthieu@mnapoli.fr

Table of Contents

Interfaces

Definition

Properties

$className  : string|null
Class name (if null, then the class name is $name).
$constructorInjection  : MethodInjection|null
$lazy  : bool|null
$methodInjections  : array<string|int, array<string|int, MethodInjection>>
Method calls.
$propertyInjections  : array<string|int, mixed>
$classExists  : bool
Store if the class exists. Storing it (in cache) avoids recomputing this.
$isInstantiable  : bool
Store if the class is instantiable. Storing it (in cache) avoids recomputing this.
$name  : string
Entry name (most of the time, same as $classname).

Methods

__construct()  : mixed
__toString()  : string
addMethodInjection()  : void
addPropertyInjection()  : void
classExists()  : bool
completeConstructorInjection()  : void
completeFirstMethodInjection()  : void
getClassName()  : string
getConstructorInjection()  : MethodInjection|null
getMethodInjections()  : array<string|int, MethodInjection>
getName()  : string
getPropertyInjections()  : array<string|int, PropertyInjection>
isInstantiable()  : bool
isLazy()  : bool
replaceNestedDefinitions()  : void
replaceWildcards()  : void
Replaces all the wildcards in the string with the given replacements.
setClassName()  : void
setConstructorInjection()  : void
setLazy()  : void
setName()  : void
updateCache()  : void

Properties

$className

Class name (if null, then the class name is $name).

protected string|null $className = null

$propertyInjections

protected array<string|int, mixed> $propertyInjections = []

$classExists

Store if the class exists. Storing it (in cache) avoids recomputing this.

private bool $classExists

$isInstantiable

Store if the class is instantiable. Storing it (in cache) avoids recomputing this.

private bool $isInstantiable

$name

Entry name (most of the time, same as $classname).

private string $name

Methods

__construct()

public __construct(string $name[, string|null $className = null ]) : mixed
Parameters
$name : string

Entry name

$className : string|null = null

replaceNestedDefinitions()

public replaceNestedDefinitions(callable $replacer) : void
Parameters
$replacer : callable

replaceWildcards()

Replaces all the wildcards in the string with the given replacements.

public replaceWildcards(array<string|int, string> $replacements) : void
Parameters
$replacements : array<string|int, string>

setClassName()

public setClassName(string|null $className) : void
Parameters
$className : string|null

setLazy()

public setLazy([bool|null $lazy = null ]) : void
Parameters
$lazy : bool|null = null

setName()

public setName(string $name) : void
Parameters
$name : string

        
On this page

Search results