Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
DI\Definition\ObjectDefinition Class Reference
Inheritance diagram for DI\Definition\ObjectDefinition:
DI\Definition\Definition DI\Factory\RequestedEntry DI\Definition\AutowireDefinition

Public Member Functions

 __construct (string $name, string $className=null)
 
 __toString ()
 Definitions can be cast to string for debugging information.
 
 addMethodInjection (MethodInjection $methodInjection)
 
 addPropertyInjection (PropertyInjection $propertyInjection)
 
 classExists ()
 
 completeConstructorInjection (MethodInjection $injection)
 
 completeFirstMethodInjection (MethodInjection $injection)
 
 getClassName ()
 
 getConstructorInjection ()
 
 getMethodInjections ()
 
 getName ()
 Returns the name of the entry in the container.
 
 getPropertyInjections ()
 
 isInstantiable ()
 
 isLazy ()
 
 replaceNestedDefinitions (callable $replacer)
 Apply a callable that replaces the definitions nested in this definition.
 
 replaceWildcards (array $replacements)
 Replaces all the wildcards in the string with the given replacements.
 
 setClassName (?string $className)
 
 setConstructorInjection (MethodInjection $constructorInjection)
 
 setLazy (bool $lazy=null)
 
 setName (string $name)
 Set the name of the entry in the container.
 

Protected Attributes

string $className = null
 Class name (if null, then the class name is $name).
 
MethodInjection $constructorInjection = null
 
bool $lazy = null
 
MethodInjection[][] array $methodInjections = []
 Method calls.
 
array $propertyInjections = []
 

Constructor & Destructor Documentation

◆ __construct()

DI\Definition\ObjectDefinition::__construct ( string $name,
string $className = null )
Parameters
string$nameEntry name

Member Function Documentation

◆ __toString()

DI\Definition\ObjectDefinition::__toString ( )

Definitions can be cast to string for debugging information.

Implements DI\Definition\Definition.

◆ getMethodInjections()

DI\Definition\ObjectDefinition::getMethodInjections ( )
Return values
MethodInjection[]Method injections

◆ getName()

DI\Definition\ObjectDefinition::getName ( )

Returns the name of the entry in the container.

Implements DI\Definition\Definition.

◆ getPropertyInjections()

DI\Definition\ObjectDefinition::getPropertyInjections ( )
Return values
PropertyInjection[]Property injections

◆ replaceNestedDefinitions()

DI\Definition\ObjectDefinition::replaceNestedDefinitions ( callable $replacer)

Apply a callable that replaces the definitions nested in this definition.

Implements DI\Definition\Definition.

◆ replaceWildcards()

DI\Definition\ObjectDefinition::replaceWildcards ( array $replacements)

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

Parameters
string[]$replacements

◆ setName()

DI\Definition\ObjectDefinition::setName ( string $name)

Set the name of the entry in the container.

Implements DI\Definition\Definition.


The documentation for this class was generated from the following file: