PHP Класс AppserverIo\Appserver\DependencyInjectionContainer\Provider

Автор: Tim Wagner ([email protected])
Наследование: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Appserver\DependencyInjectionContainer\Interfaces\ProviderInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface Returns the application instance.
getAttribute ( string $key ) : mixed Returns the value with the passed name from the context.
getIdentifier ( ) : string The managers unique identifier.
getInitialContext ( ) : AppserverIo\Psr\Naming\InitialContext Returns the naming context instance.
getNamingDirectory ( ) : AppserverIo\Psr\Naming\NamingDirectoryInterface Returns the applications naming directory.
getReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass Returns a new reflection class intance for the passed class name.
getReflectionClassForObject ( object $instance ) : AppserverIo\Lang\Reflection\ReflectionClass Returns a reflection class intance for the passed class name.
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Has been automatically invoked by the container after the application instance has been created.
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void The application instance.
injectDependencies ( object $instance, string | null $sessionId = null ) : void Injects the dependencies of the passed instance.
injectNamingDirectoryAliases ( AppserverIo\Storage\GenericStackable $namingDirectoryAliases ) : void Injects the naming directory aliases.
injectReflectionClasses ( AppserverIo\Storage\GenericStackable $reflectionClasses ) : void Injects the storage for the loaded reflection classes.
newAnnotationInstance ( AppserverIo\Lang\Reflection\AnnotationInterface $annotation ) : AppserverIo\Lang\Reflection\AnnotationInterface Creates a new new instance of the annotation type, defined in the passed reflection annotation.
newInstance ( string $className, string | null $sessionId = null, array $args = [] ) : object Returns a new instance of the passed class name.
newReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass Returns a reflection class instance for the passed class name.
setReflectionClass ( AppserverIo\Lang\Reflection\ClassInterface $reflectionClass ) : void Adds the passe reflection class instance to the DI provider.

Описание методов

getApplication() публичный метод

Returns the application instance.
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface
Результат AppserverIo\Psr\Application\ApplicationInterface The application instance

getAttribute() публичный метод

Returns the value with the passed name from the context.
public getAttribute ( string $key ) : mixed
$key string The key of the value to return from the context.
Результат mixed The requested attribute

getIdentifier() публичный метод

The managers unique identifier.
См. также: AppserverIo\Psr\Application\ManagerInterface::getIdentifier()
public getIdentifier ( ) : string
Результат string The unique identifier

getInitialContext() публичный метод

Returns the naming context instance.
public getInitialContext ( ) : AppserverIo\Psr\Naming\InitialContext
Результат AppserverIo\Psr\Naming\InitialContext The naming context instance

getNamingDirectory() публичный метод

Returns the applications naming directory.
public getNamingDirectory ( ) : AppserverIo\Psr\Naming\NamingDirectoryInterface
Результат AppserverIo\Psr\Naming\NamingDirectoryInterface The applications naming directory interface

getReflectionClass() публичный метод

Returns a new reflection class intance for the passed class name.
public getReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass
$className string The class name to return the reflection class instance for
Результат AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

getReflectionClassForObject() публичный метод

Returns a reflection class intance for the passed class name.
См. также: DependencyInjectionContainer\Interfaces\ProviderInterface::newReflectionClass()
См. также: DependencyInjectionContainer\Interfaces\ProviderInterface::getReflectionClass()
public getReflectionClassForObject ( object $instance ) : AppserverIo\Lang\Reflection\ReflectionClass
$instance object The instance to return the reflection class instance for
Результат AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

initialize() публичный метод

Has been automatically invoked by the container after the application instance has been created.
См. также: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Результат void

injectApplication() публичный метод

The application instance.
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Результат void

injectDependencies() публичный метод

Injects the dependencies of the passed instance.
public injectDependencies ( object $instance, string | null $sessionId = null ) : void
$instance object The instance to inject the dependencies for
$sessionId string | null The session-ID, necessary to inject stateful session beans (SFBs)
Результат void

injectNamingDirectoryAliases() публичный метод

Injects the naming directory aliases.
public injectNamingDirectoryAliases ( AppserverIo\Storage\GenericStackable $namingDirectoryAliases ) : void
$namingDirectoryAliases AppserverIo\Storage\GenericStackable The naming directory aliases
Результат void

injectReflectionClasses() публичный метод

Injects the storage for the loaded reflection classes.
public injectReflectionClasses ( AppserverIo\Storage\GenericStackable $reflectionClasses ) : void
$reflectionClasses AppserverIo\Storage\GenericStackable The storage for the reflection classes
Результат void

newAnnotationInstance() публичный метод

Creates a new new instance of the annotation type, defined in the passed reflection annotation.
public newAnnotationInstance ( AppserverIo\Lang\Reflection\AnnotationInterface $annotation ) : AppserverIo\Lang\Reflection\AnnotationInterface
$annotation AppserverIo\Lang\Reflection\AnnotationInterface The reflection annotation we want to create the instance for
Результат AppserverIo\Lang\Reflection\AnnotationInterface The real annotation instance

newInstance() публичный метод

Returns a new instance of the passed class name.
public newInstance ( string $className, string | null $sessionId = null, array $args = [] ) : object
$className string The fully qualified class name to return the instance for
$sessionId string | null The session-ID, necessary to inject stateful session beans (SFBs)
$args array Arguments to pass to the constructor of the instance
Результат object The instance itself

newReflectionClass() публичный метод

Returns a reflection class instance for the passed class name.
public newReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass
$className string The class name to return the reflection instance for
Результат AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

setReflectionClass() публичный метод

Adds the passe reflection class instance to the DI provider.
public setReflectionClass ( AppserverIo\Lang\Reflection\ClassInterface $reflectionClass ) : void
$reflectionClass AppserverIo\Lang\Reflection\ClassInterface The reflection class instance to add
Результат void