PHP Класс AppserverIo\Appserver\Core\Scanner\DeploymentScanner

Автор: Tim Wagner ([email protected])
Наследование: extends AbstractScanner
Показать файл Открыть проект

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

Свойство Тип Описание
$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