PHP Interface AppserverIo\Appserver\Core\Interfaces\ContainerInterface

Show file Open project: appserver-io/appserver Interface Usage Examples

Public Methods

Method Description
addApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Append the deployed application to the deployment instance and registers it in the system configuration.
getAppBase ( ) : string The application base directory for this container
getApplication ( string $name ) : AppserverIo\Psr\Application\ApplicationInterface Returns the application instance with the passed name.
getApplications ( ) : AppserverIo\Storage\GenericStackable Returns the deployed applications.
getContainerNode ( ) : ContainerNode Returns the containers configuration node.
getInitialContext ( ) : AppserverIo\Appserver\Application\Interfaces\ContextInterface Returns the initial context instance.
getName ( ) : string Returns the unique container name from the configuration.
getNamingDirectory ( ) : AppserverIo\Psr\Naming\NamingDirectoryInterface Returns the containers naming directory.
getRunlevel ( ) : string
getTmpDir ( string | null $directoryToAppend = null ) : string Returns the servers tmp directory, append with the passed directory.
hasProvisioningEnabled ( ) : boolean Returns TRUE if application provisioning for the container is enabled, else FALSE.
newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface Will return a new instance of a given service class
stop ( ) : void Stops the container and all servers.

Method Details

addApplication() public method

Append the deployed application to the deployment instance and registers it in the system configuration.
public addApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application to append
return void

getAppBase() public method

The application base directory for this container
public getAppBase ( ) : string
return string The application base directory for this container

getApplication() public method

Returns the application instance with the passed name.
public getApplication ( string $name ) : AppserverIo\Psr\Application\ApplicationInterface
$name string The name of the application to return
return AppserverIo\Psr\Application\ApplicationInterface The application instance

getApplications() public method

Returns the deployed applications.
public getApplications ( ) : AppserverIo\Storage\GenericStackable
return AppserverIo\Storage\GenericStackable The with applications

getContainerNode() public method

Returns the containers configuration node.
public getContainerNode ( ) : ContainerNode
return AppserverIo\Appserver\Core\Api\Node\ContainerNode The configuration node

getInitialContext() public method

Returns the initial context instance.
public getInitialContext ( ) : AppserverIo\Appserver\Application\Interfaces\ContextInterface
return AppserverIo\Appserver\Application\Interfaces\ContextInterface The initial context instance

getName() public method

Returns the unique container name from the configuration.
public getName ( ) : string
return string The unique container name

getNamingDirectory() public method

Returns the containers naming directory.
public getNamingDirectory ( ) : AppserverIo\Psr\Naming\NamingDirectoryInterface
return AppserverIo\Psr\Naming\NamingDirectoryInterface The containers naming directory

getRunlevel() public method

public getRunlevel ( ) : string
return string

getTmpDir() public method

Returns the servers tmp directory, append with the passed directory.
public getTmpDir ( string | null $directoryToAppend = null ) : string
$directoryToAppend string | null The directory to append
return string

hasProvisioningEnabled() public method

Returns TRUE if application provisioning for the container is enabled, else FALSE.
public hasProvisioningEnabled ( ) : boolean
return boolean TRUE if application provisioning is enabled, else FALSE

newService() public method

Will return a new instance of a given service class
public newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface
$className string The API service class name to return the instance for
return AppserverIo\Appserver\Core\Api\ServiceInterface The service instance

stop() public method

Stops the container and all servers.
public stop ( ) : void
return void