PHP Class AppserverIo\Appserver\Core\AbstractManager

Author: Tim Wagner ([email protected])
Author: Bernhard Wick ([email protected])
Inheritance: extends AppserverIo\Storage\GenericStackable, implements AppserverIo\Psr\Application\ManagerInterface
Show file Open project: appserver-io/appserver

Public Methods

Method Description
getAppBase ( ) : string Returns the absolute path to the application directory.
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface Returns the application instance.
getAttribute ( string $key ) : mixed | null Returns the attribute with the passed key from the container.
getBaseDirectory ( string $directoryToAppend = null ) : string Returns the absolute path to the application server's base directory.
getInitialContext ( ) : AppserverIo\Psr\Naming\InitialContext Returns the global naming directory.
getManagerConfiguration ( ) : AppserverIo\Psr\Application\ManagerConfigurationInterface Return's the manager configuration.
getReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass Returns a 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.
getWebappPath ( ) : string Returns the absolute path to the web application.
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Inject the application instance.
injectData ( AppserverIo\Storage\StorageInterface $data ) : void Inject the data storage.
injectInitialContext ( AppserverIo\Psr\Naming\InitialContext $initialContext ) : void The global naming directory.
injectManagerConfiguration ( AppserverIo\Psr\Application\ManagerConfigurationInterface $managerConfiguration ) : void Inject the configuration for this manager.
lookupProxy ( string $lookupName, string $sessionId = null ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface This returns a proxy to the requested session bean.
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 new reflection class intance for the passed class name.
setAttribute ( string $key, object $value ) : void Registers the value with the passed key in the container.
stop ( ) : void A dummy functionality to implement the stop functionality.

Method Details

getAppBase() public method

Returns the absolute path to the application directory.
public getAppBase ( ) : string
return string The absolute path to the application directory

getApplication() public method

Returns the application instance.
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface
return AppserverIo\Psr\Application\ApplicationInterface | AppserverIo\Psr\Naming\NamingDirectoryInterface The application instance

getAttribute() public method

Returns the attribute with the passed key from the container.
public getAttribute ( string $key ) : mixed | null
$key string The key the requested value is registered with
return mixed | null The requested value if available

getBaseDirectory() public method

Returns the absolute path to the application server's base directory.
public getBaseDirectory ( string $directoryToAppend = null ) : string
$directoryToAppend string A directory to append to the base directory
return string The absolute path the application server's base directory

getInitialContext() public method

Returns the global naming directory.
public getInitialContext ( ) : AppserverIo\Psr\Naming\InitialContext
return AppserverIo\Psr\Naming\InitialContext The global naming directory

getManagerConfiguration() public method

Return's the manager configuration.
public getManagerConfiguration ( ) : AppserverIo\Psr\Application\ManagerConfigurationInterface
return AppserverIo\Psr\Application\ManagerConfigurationInterface The manager configuration

getReflectionClass() public method

Returns a reflection class intance for the passed class name.
See also: DependencyInjectionContainer\Interfaces\ProviderInterface::getReflectionClass()
public getReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass
$className string The class name to return the reflection class instance for
return AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

getReflectionClassForObject() public method

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

getWebappPath() public method

Returns the absolute path to the web application.
public getWebappPath ( ) : string
return string The absolute path

injectApplication() public method

Inject the application instance.
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return void

injectData() public method

Inject the data storage.
public injectData ( AppserverIo\Storage\StorageInterface $data ) : void
$data AppserverIo\Storage\StorageInterface The data storage to use
return void

injectInitialContext() public method

The global naming directory.
public injectInitialContext ( AppserverIo\Psr\Naming\InitialContext $initialContext ) : void
$initialContext AppserverIo\Psr\Naming\InitialContext The global naming directory
return void

injectManagerConfiguration() public method

Inject the configuration for this manager.
public injectManagerConfiguration ( AppserverIo\Psr\Application\ManagerConfigurationInterface $managerConfiguration ) : void
$managerConfiguration AppserverIo\Psr\Application\ManagerConfigurationInterface The managers configuration
return void

lookupProxy() public method

This returns a proxy to the requested session bean.
public lookupProxy ( string $lookupName, string $sessionId = null ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface
$lookupName string The lookup name for the requested session bean
$sessionId string The session-ID if available
return AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The proxy instance

newInstance() public method

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
return object The instance itself

newReflectionClass() public method

Returns a new reflection class intance for the passed class name.
public newReflectionClass ( string $className ) : AppserverIo\Lang\Reflection\ReflectionClass
$className string The class name to return the reflection class instance for
return AppserverIo\Lang\Reflection\ReflectionClass The reflection instance

setAttribute() public method

Registers the value with the passed key in the container.
public setAttribute ( string $key, object $value ) : void
$key string The key to register the value with
$value object The value to register
return void

stop() public method

A dummy functionality to implement the stop functionality.
public stop ( ) : void
return void \AppserverIo\Psr\Application\ManagerInterface::stop()