\PhugDependencyInjection

Summary

Methods
Properties
Constants
import()
importDependency()
isRequired()
setAsRequired()
getStorageItem()
dumpDependency()
countRequiredDependencies()
getRequirementsStates()
export()
provider()
register()
has()
getProvider()
set()
get()
call()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$dependencies
$dependenciesParams
$cache
N/A

Properties

$dependenciesParams

$dependenciesParams : array<mixed,array>

Type

array<mixed,array>

$cache

$cache : array

Type

array

Methods

import()

import(  $name) : mixed

Parameters

$name

Throws

\ReflectionException
\Phug\DependencyException

Returns

mixed

isRequired()

isRequired(string  $name) : boolean

Parameters

string $name

Throws

\Phug\DependencyException

Returns

boolean

setAsRequired()

setAsRequired(  $name) : $this

Parameters

$name

Throws

\Phug\DependencyException

Returns

$this

getStorageItem()

getStorageItem(string  $name, string  $storageVariable) : string

Parameters

string $name
string $storageVariable

Returns

string

dumpDependency()

dumpDependency(string  $name, string  $storageVariable = null) : string

Parameters

string $name
string $storageVariable

Throws

\Phug\DependencyException
\ReflectionException

Returns

string

countRequiredDependencies()

countRequiredDependencies() : integer

Returns

integer

getRequirementsStates()

getRequirementsStates() : array

Return the state of each requirement as an array where the key is the requirement name and the value is true if it's already required, false else.

Returns

array

export()

export(string  $storageVariable) : string

Parameters

string $storageVariable

Returns

string

provider()

provider(string  $name, array|callable  $provider) : \Phug\DependencyInjection

Parameters

string $name
array|callable $provider

Throws

\Phug\DependencyException

Returns

\Phug\DependencyInjection

register()

register(string  $name, mixed  $value) : \Phug\DependencyInjection

Parameters

string $name
mixed $value

Throws

\Phug\DependencyException

Returns

\Phug\DependencyInjection

has()

has(string  $name) : boolean

Parameters

string $name

Returns

boolean

get()

get(string  $name, array  $exclude = array()) : mixed

Parameters

string $name
array $exclude

Throws

\Phug\DependencyException
\ReflectionException

Returns

mixed

call()

call(string  $name) : mixed

Parameters

string $name

Throws

\Phug\DependencyException
\ReflectionException

Returns

mixed