PHP Класс AppserverIo\Appserver\Core\Api\AbstractService

Автор: Tim Wagner ([email protected])
Автор: Bernhard Wick ([email protected])
Наследование: implements AppserverIo\Appserver\Core\Api\ServiceInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$initialContext AppserverIo\Appserver\Core\InitialContext The initial context instance containing the system configuration.
$node AppserverIo\Configuration\Interfaces\NodeInterface; The initialized base directory node.
$normalizer AppserverIo\Appserver\Core\Api\NormalizerInterface The normalizer instance to use.

Открытые методы

Метод Описание
__construct ( InitialContext $initialContext ) Initializes the service with the initial context instance and the default normalizer instance.
getBaseDirectory ( string | null $directoryToAppend = null ) : string Returns the application servers base directory.
getConfDir ( string $relativePathToAppend = '' ) : string Return's the server's main configuration directory.
getConfdDir ( string $relativePathToAppend = '' ) : string Return's the server's configuration subdirectory.
getDeployDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the servers deploy directory.
getDirectories ( ) : array Returns the directory structure to be created at first start.
getEtcDir ( string $relativePathToAppend = '' ) : string Return's the server's base configuration directory.
getFiles ( ) : array Returns the files to be created at first start.
getInitialContext ( ) : InitialContext (non-PHPdoc)
getLogDir ( string $relativePathToAppend = '' ) : string Returns the servers log directory.
getOsIdentifier ( ) : string Will return a three character OS identifier e.g. WIN or LIN
getServerSignature ( ) : string Returns the real server signature depending on the installed appserver version and the PHP version we're running on, for example:
getSystemConfiguration ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface (non-PHPdoc)
getSystemProperties ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode = null ) : AppserverIo\Properties\Properties Returns the system proprties. If a container node has been passed, the container properties will also be appended.
getSystemTmpDir ( string $relativePathToAppend = '' ) : string Return's the system's temporary directory.
getTmpDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the servers tmp directory, append with the passed directory.
getWebappsDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string Returns the servers webapps directory.
globDir ( string $pattern, integer $flags, boolean $recursive = true ) : array Parses and returns the directories and files that matches the passed glob pattern in a recursive way (if wanted).
makePathAbsolute ( string $path = '' ) : string Makes the path an absolute path or returns null if passed path is empty.
newInstance ( string $className, array $args = [] ) : object (non-PHPdoc)
newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface (non-PHPdoc)
persist ( AppserverIo\Configuration\Interfaces\NodeInterface $node ) : void Persists the system configuration.
realpath ( string $relativePathToAppend ) : string Returns the absolute path to the passed directory, also working on Windows.
setSystemConfiguration ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration ) : AppserverIo\Appserver\Core\Api\ServiceInterface (non-PHPdoc)

Описание методов

__construct() публичный Метод

Initializes the service with the initial context instance and the default normalizer instance.
public __construct ( InitialContext $initialContext )
$initialContext AppserverIo\Appserver\Core\InitialContext The initial context instance

getBaseDirectory() публичный Метод

Returns the application servers base directory.
public getBaseDirectory ( string | null $directoryToAppend = null ) : string
$directoryToAppend string | null Append this directory to the base directory before returning it
Результат string The base directory

getConfDir() публичный Метод

Return's the server's main configuration directory.
public getConfDir ( string $relativePathToAppend = '' ) : string
$relativePathToAppend string A relative path to append
Результат string The server's main configuration directory

getConfdDir() публичный Метод

Return's the server's configuration subdirectory.
public getConfdDir ( string $relativePathToAppend = '' ) : string
$relativePathToAppend string A relative path to append
Результат string The server's configuration subdirectory

getDeployDir() публичный Метод

Returns the servers deploy directory.
public getDeployDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the deployment directory for
$relativePathToAppend string A relative path to append
Результат string

getDirectories() публичный Метод

Returns the directory structure to be created at first start.
public getDirectories ( ) : array
Результат array The directory structure to be created if necessary

getEtcDir() публичный Метод

Return's the server's base configuration directory.
public getEtcDir ( string $relativePathToAppend = '' ) : string
$relativePathToAppend string A relative path to append
Результат string The server's base configuration directory

getFiles() публичный Метод

Returns the files to be created at first start.
public getFiles ( ) : array
Результат array The files to be created if necessary

getInitialContext() публичный Метод

(non-PHPdoc)
См. также: ServiceInterface::getInitialContext()
public getInitialContext ( ) : InitialContext
Результат AppserverIo\Appserver\Core\InitialContext The initial Context

getLogDir() публичный Метод

Returns the servers log directory.
public getLogDir ( string $relativePathToAppend = '' ) : string
$relativePathToAppend string A relative path to append
Результат string

getOsIdentifier() публичный Метод

Will return a three character OS identifier e.g. WIN or LIN
public getOsIdentifier ( ) : string
Результат string

getServerSignature() публичный Метод

appserver/1.0.1-45 (darwin) PHP/5.5.21
public getServerSignature ( ) : string
Результат string The server signature

getSystemConfiguration() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Api\ServiceInterface::getSystemConfiguration()
public getSystemConfiguration ( ) : AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface
Результат AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration

getSystemProperties() публичный Метод

Returns the system proprties. If a container node has been passed, the container properties will also be appended.
public getSystemProperties ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode = null ) : AppserverIo\Properties\Properties
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the system properties for
Результат AppserverIo\Properties\Properties The system properties

getSystemTmpDir() публичный Метод

Return's the system's temporary directory.
public getSystemTmpDir ( string $relativePathToAppend = '' ) : string
$relativePathToAppend string A relative path to append
Результат string The system's temporary directory

getTmpDir() публичный Метод

Returns the servers tmp directory, append with the passed directory.
public getTmpDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
Результат string

getWebappsDir() публичный Метод

Returns the servers webapps directory.
public getWebappsDir ( AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface $containerNode, string $relativePathToAppend = '' ) : string
$containerNode AppserverIo\Appserver\Core\Api\Node\ContainerNodeInterface The container to return the temporary directory for
$relativePathToAppend string A relative path to append
Результат string

globDir() публичный Метод

Parses and returns the directories and files that matches the passed glob pattern in a recursive way (if wanted).
public globDir ( string $pattern, integer $flags, boolean $recursive = true ) : array
$pattern string The glob pattern used to parse the directories
$flags integer The flags passed to the glob function
$recursive boolean Whether or not to parse directories recursively
Результат array The directories matches the passed glob pattern

makePathAbsolute() публичный Метод

Makes the path an absolute path or returns null if passed path is empty.
public makePathAbsolute ( string $path = '' ) : string
$path string A path to absolute
Результат string The absolute path

newInstance() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\InitialContext::newInstance()
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

newService() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\InitialContext::newService()
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

persist() публичный Метод

Persists the system configuration.
public persist ( AppserverIo\Configuration\Interfaces\NodeInterface $node ) : void
$node AppserverIo\Configuration\Interfaces\NodeInterface A node to persist
Результат void

realpath() публичный Метод

Returns the absolute path to the passed directory, also working on Windows.
public realpath ( string $relativePathToAppend ) : string
$relativePathToAppend string The relativ path to return the absolute path for
Результат string The absolute path of the passed directory

setSystemConfiguration() публичный Метод

(non-PHPdoc)
См. также: AppserverIo\Appserver\Core\Api\ServiceInterface::setSystemConfiguration()
public setSystemConfiguration ( AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface $systemConfiguration ) : AppserverIo\Appserver\Core\Api\ServiceInterface
$systemConfiguration AppserverIo\Appserver\Core\Interfaces\SystemConfigurationInterface The system configuration
Результат AppserverIo\Appserver\Core\Api\ServiceInterface

Описание свойств

$initialContext защищенное свойство

The initial context instance containing the system configuration.
protected InitialContext,AppserverIo\Appserver\Core $initialContext
Результат AppserverIo\Appserver\Core\InitialContext

$node защищенное свойство

The initialized base directory node.
protected NodeInterface;,AppserverIo\Configuration\Interfaces $node
Результат AppserverIo\Configuration\Interfaces\NodeInterface;

$normalizer защищенное свойство

The normalizer instance to use.
protected NormalizerInterface,AppserverIo\Appserver\Core\Api $normalizer
Результат AppserverIo\Appserver\Core\Api\NormalizerInterface