PHP 클래스 AppserverIo\Appserver\DependencyInjectionContainer\Provider

상속: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Appserver\DependencyInjectionContainer\Interfaces\ProviderInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

공개 메소드들

메소드 설명
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