PHP Class AppserverIo\Appserver\DependencyInjectionContainer\Provider

Inheritance: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Appserver\DependencyInjectionContainer\Interfaces\ProviderInterface
Afficher le fichier Open project: appserver-io/appserver Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

getApplication() public méthode

Returns the application instance.
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface
Résultat AppserverIo\Psr\Application\ApplicationInterface The application instance

getAttribute() public méthode

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.
Résultat mixed The requested attribute

getIdentifier() public méthode

The managers unique identifier.
See also: AppserverIo\Psr\Application\ManagerInterface::getIdentifier()
public getIdentifier ( ) : string
Résultat string The unique identifier

getInitialContext() public méthode

Returns the naming context instance.
public getInitialContext ( ) : AppserverIo\Psr\Naming\InitialContext
Résultat AppserverIo\Psr\Naming\InitialContext The naming context instance

getNamingDirectory() public méthode

Returns the applications naming directory.
public getNamingDirectory ( ) : AppserverIo\Psr\Naming\NamingDirectoryInterface
Résultat AppserverIo\Psr\Naming\NamingDirectoryInterface The applications naming directory interface

getReflectionClass() public méthode

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
Résultat AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

getReflectionClassForObject() public méthode

Returns a reflection class intance for the passed class name.
See also: DependencyInjectionContainer\Interfaces\ProviderInterface::newReflectionClass()
See also: DependencyInjectionContainer\Interfaces\ProviderInterface::getReflectionClass()
public getReflectionClassForObject ( object $instance ) : AppserverIo\Lang\Reflection\ReflectionClass
$instance object The instance to return the reflection class instance for
Résultat AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

initialize() public méthode

Has been automatically invoked by the container after the application instance has been created.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Résultat void

injectApplication() public méthode

The application instance.
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
Résultat void

injectDependencies() public méthode

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)
Résultat void

injectNamingDirectoryAliases() public méthode

Injects the naming directory aliases.
public injectNamingDirectoryAliases ( AppserverIo\Storage\GenericStackable $namingDirectoryAliases ) : void
$namingDirectoryAliases AppserverIo\Storage\GenericStackable The naming directory aliases
Résultat void

injectReflectionClasses() public méthode

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
Résultat void

newAnnotationInstance() public méthode

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
Résultat AppserverIo\Lang\Reflection\AnnotationInterface The real annotation instance

newInstance() public méthode

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
Résultat object The instance itself

newReflectionClass() public méthode

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
Résultat AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

setReflectionClass() public méthode

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
Résultat void