PHP 클래스 AppserverIo\Appserver\Core\InitialContext

상속: implements AppserverIo\Appserver\Application\Interfaces\ContextInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$classLoader AppserverIo\Appserver\Core\SplClassLoader The server's classLoading instance
$storage AppserverIo\Storage\StorageInterface The storage instance
$systemLogger Psr\Log\LoggerInterface The server's system logger instance.

공개 메소드들

메소드 설명
__construct ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration ) Initializes the context with the connection to the storage backend.
getAttribute ( string $key ) : mixed Returns the value with the passed key from the initial context.
getLogger ( string $loggerName ) : Psr\Log\LoggerInterface | null Gets the logger by given name
getLoggers ( ) : array Return
getStorage ( ) : AppserverIo\Storage\StorageInterface Returns the storage instance.
getSystemConfiguration ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface Returns the system configuration.
getSystemLogger ( ) : Psr\Log\LoggerInterface Returns the system logger instance.
newInstance ( string $className, array $args = [] ) : object Returns a new instance of the passed class name.
newReflectionClass ( string $className ) : ReflectionClass Returns a reflection class instance for the passed class name.
newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface Returns a new instance of the passed API service.
removeAttribute ( string $key ) : void Removes the attribute with the passed key from the initial context.
setAttribute ( string $key, mixed $value ) : void Stores the passed key value pair in the initial context.
setLoggers ( array $loggers ) : void Set's logger array
setStorage ( AppserverIo\Storage\StorageInterface $storage ) : AppserverIo\Storage\StorageInterface Returns the storage instance.
setSystemConfiguration ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration ) : void Adds the system configuration to the initial context.
setSystemLogger ( Psr\Log\LoggerInterface $systemLogger ) : void Set's the system logger instance.

메소드 상세

__construct() 공개 메소드

Initializes the context with the connection to the storage backend.
public __construct ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration )
$systemConfiguration AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration

getAttribute() 공개 메소드

Returns the value with the passed key from the initial context.
public getAttribute ( string $key ) : mixed
$key string The key of the value to return
리턴 mixed The value stored in the initial context

getLogger() 공개 메소드

Gets the logger by given name
public getLogger ( string $loggerName ) : Psr\Log\LoggerInterface | null
$loggerName string the loggers name
리턴 Psr\Log\LoggerInterface | null The logger instance

getLoggers() 공개 메소드

Return
public getLoggers ( ) : array
리턴 array

getStorage() 공개 메소드

Returns the storage instance.
public getStorage ( ) : AppserverIo\Storage\StorageInterface
리턴 AppserverIo\Storage\StorageInterface The storage instance

getSystemConfiguration() 공개 메소드

Returns the system configuration.
public getSystemConfiguration ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface
리턴 AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration

getSystemLogger() 공개 메소드

Returns the system logger instance.
public getSystemLogger ( ) : Psr\Log\LoggerInterface
리턴 Psr\Log\LoggerInterface

newInstance() 공개 메소드

Returns a new instance of the passed class name.
public newInstance ( string $className, array $args = [] ) : object
$className string The fully qualified class name to return the instance for
$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 ) : ReflectionClass
$className string The class name to return the reflection instance for
리턴 ReflectionClass The reflection instance

newService() 공개 메소드

Returns a new instance of the passed API service.
public newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface
$className string The API service class name to return the instance for
리턴 AppserverIo\Appserver\Core\Api\ServiceInterface The service instance

removeAttribute() 공개 메소드

Removes the attribute with the passed key from the initial context.
public removeAttribute ( string $key ) : void
$key string The key of the value to delete
리턴 void

setAttribute() 공개 메소드

Stores the passed key value pair in the initial context.
public setAttribute ( string $key, mixed $value ) : void
$key string The key to store the value under
$value mixed The value to add to the initial context
리턴 void

setLoggers() 공개 메소드

Set's logger array
public setLoggers ( array $loggers ) : void
$loggers array The loggers array to set
리턴 void

setStorage() 공개 메소드

Returns the storage instance.
public setStorage ( AppserverIo\Storage\StorageInterface $storage ) : AppserverIo\Storage\StorageInterface
$storage AppserverIo\Storage\StorageInterface A storage instance
리턴 AppserverIo\Storage\StorageInterface The storage instance

setSystemConfiguration() 공개 메소드

Adds the system configuration to the initial context.
public setSystemConfiguration ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration ) : void
$systemConfiguration AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration
리턴 void

setSystemLogger() 공개 메소드

Set's the system logger instance.
public setSystemLogger ( Psr\Log\LoggerInterface $systemLogger ) : void
$systemLogger Psr\Log\LoggerInterface The system logger
리턴 void

프로퍼티 상세

$classLoader 보호되어 있는 프로퍼티

The server's classLoading instance
protected SplClassLoader,AppserverIo\Appserver\Core $classLoader
리턴 AppserverIo\Appserver\Core\SplClassLoader

$storage 보호되어 있는 프로퍼티

The storage instance
protected StorageInterface,AppserverIo\Storage $storage
리턴 AppserverIo\Storage\StorageInterface

$systemLogger 보호되어 있는 프로퍼티

The server's system logger instance.
protected LoggerInterface,Psr\Log $systemLogger
리턴 Psr\Log\LoggerInterface