\Anax\DIInjectionMagicTrait

Trait to use for DI aware services to let them know of the current $di.

Summary

Methods
Properties
Constants
__get()
__call()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
find()
No private properties found
N/A

Methods

__get()

__get(string  $service) : object

Magic method to get and create services.

When created it is also stored as a parameter of this object.

Parameters

string $service

name of class property not existing.

Throws

\Anax\DI\NotFoundException

No entry was found for this identifier.

Returns

object —

as the service requested.

__call()

__call(string  $service, array  $arguments = array()) : \Anax\DI\class

Magic method to get and create services as a method call.

When created it is also stored as a parameter of this object.

Parameters

string $service

name of class property not existing.

array $arguments

Additional arguments to sen to the method (NOT IMPLEMENTED).

Throws

\Anax\DI\NotFoundException

No entry was found for this identifier.

Returns

\Anax\DI\class —

as the service requested.

find()

find(string  $service) : object

Find, load service and set as part of the class, then return it.

Parameters

string $service

name of class property not existing.

Throws

\Anax\DI\NotFoundException

No entry was found for this identifier.

Returns

object —

as the service requested.