PHP 클래스 AppserverIo\Appserver\Core\Api\AbstractService

저자: Tim Wagner ([email protected])
저자: Bernhard Wick ([email protected])
상속: implements AppserverIo\Appserver\Core\Api\ServiceInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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