PHP 클래스 AppserverIo\Appserver\Core\Scanner\DeploymentScanner

상속: extends AbstractScanner
파일 보기 프로젝트 열기: appserver-io/appserver

보호된 프로퍼티들

프로퍼티 타입 설명
$directory array The directory we want to watch.
$extensionsToWatch array A list with extensions of files we want to watch.
$interval integer The interval in seconds we use to scan the directory.

공개 메소드들

메소드 설명
__construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, string $name, string $directory, integer $interval = 1, string $extensionsToWatch = '' ) Constructor sets initialContext object per default and calls init function to pass other args.
getDeploymentFlag ( ) : SplFileInfo Returns the file information of the deployment flag
getDirectory ( ) : SplFileInfo Returns the path to the deployment directory
getInterval ( ) : integer Returns the interval in seconds we want to scan the directory.
getLastSuccessfullyDeployment ( SplFileInfo $file ) : integer This method returns 0 to signal that the no successful deployment has been processed so far, e. g. the server has been installed and not been started yet.
main ( ) : void Start's the deployment scanner that restarts the server when a PHAR should be deployed or undeployed.

보호된 메소드들

메소드 설명
getExtensionsToWatch ( ) : array Returns an array with file extensions that should be watched for new deployments.

메소드 상세

__construct() 공개 메소드

Constructor sets initialContext object per default and calls init function to pass other args.
public __construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, string $name, string $directory, integer $interval = 1, string $extensionsToWatch = '' )
$initialContext AppserverIo\Appserver\Application\Interfaces\ContextInterface The initial context instance
$name string The unique scanner name from the configuration
$directory string The directory we want to scan
$interval integer The interval in seconds we want scan the directory
$extensionsToWatch string The comma separated list with extensions of files we want to watch

getDeploymentFlag() 공개 메소드

Returns the file information of the deployment flag
public getDeploymentFlag ( ) : SplFileInfo
리턴 SplFileInfo The deployment flag file information

getDirectory() 공개 메소드

Returns the path to the deployment directory
public getDirectory ( ) : SplFileInfo
리턴 SplFileInfo The deployment directory

getExtensionsToWatch() 보호된 메소드

Returns an array with file extensions that should be watched for new deployments.
protected getExtensionsToWatch ( ) : array
리턴 array The array with the file extensions

getInterval() 공개 메소드

Returns the interval in seconds we want to scan the directory.
public getInterval ( ) : integer
리턴 integer The interval in seconds

getLastSuccessfullyDeployment() 공개 메소드

This method returns 0 to signal that the no successful deployment has been processed so far, e. g. the server has been installed and not been started yet.
public getLastSuccessfullyDeployment ( SplFileInfo $file ) : integer
$file SplFileInfo The deployment directory
리턴 integer The UNIX timestamp with the last successfully deployment date or 0 if no successful deployment has been processed

main() 공개 메소드

Start's the deployment scanner that restarts the server when a PHAR should be deployed or undeployed.
또한 보기: AppserverIo\Appserver\Core\AbstractThread::main()
public main ( ) : void
리턴 void

프로퍼티 상세

$directory 보호되어 있는 프로퍼티

The directory we want to watch.
protected array $directory
리턴 array

$extensionsToWatch 보호되어 있는 프로퍼티

A list with extensions of files we want to watch.
protected array $extensionsToWatch
리턴 array

$interval 보호되어 있는 프로퍼티

The interval in seconds we use to scan the directory.
protected int $interval
리턴 integer