PHP Class AppserverIo\Appserver\Core\InitialContext

Inheritance: implements AppserverIo\Appserver\Application\Interfaces\ContextInterface
Afficher le fichier Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

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

Method Details

__construct() public méthode

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() public méthode

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
Résultat mixed The value stored in the initial context

getLogger() public méthode

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

getLoggers() public méthode

Return
public getLoggers ( ) : array
Résultat array

getStorage() public méthode

Returns the storage instance.
public getStorage ( ) : AppserverIo\Storage\StorageInterface
Résultat AppserverIo\Storage\StorageInterface The storage instance

getSystemConfiguration() public méthode

Returns the system configuration.
public getSystemConfiguration ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface
Résultat AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration

getSystemLogger() public méthode

Returns the system logger instance.
public getSystemLogger ( ) : Psr\Log\LoggerInterface
Résultat Psr\Log\LoggerInterface

newInstance() public méthode

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

newReflectionClass() public méthode

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
Résultat ReflectionClass The reflection instance

newService() public méthode

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
Résultat AppserverIo\Appserver\Core\Api\ServiceInterface The service instance

removeAttribute() public méthode

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

setAttribute() public méthode

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

setLoggers() public méthode

Set's logger array
public setLoggers ( array $loggers ) : void
$loggers array The loggers array to set
Résultat void

setStorage() public méthode

Returns the storage instance.
public setStorage ( AppserverIo\Storage\StorageInterface $storage ) : AppserverIo\Storage\StorageInterface
$storage AppserverIo\Storage\StorageInterface A storage instance
Résultat AppserverIo\Storage\StorageInterface The storage instance

setSystemConfiguration() public méthode

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

setSystemLogger() public méthode

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

Property Details

$classLoader protected_oe property

The server's classLoading instance
protected SplClassLoader,AppserverIo\Appserver\Core $classLoader
Résultat AppserverIo\Appserver\Core\SplClassLoader

$storage protected_oe property

The storage instance
protected StorageInterface,AppserverIo\Storage $storage
Résultat AppserverIo\Storage\StorageInterface

$systemLogger protected_oe property

The server's system logger instance.
protected LoggerInterface,Psr\Log $systemLogger
Résultat Psr\Log\LoggerInterface