Property | Type | Description | |
---|---|---|---|
$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. |
Method | Description | |
---|---|---|
__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. |
Method | Description | |
---|---|---|
getExtensionsToWatch ( ) : array | Returns an array with file extensions that should be watched for new deployments. |
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 |
public getDeploymentFlag ( ) : SplFileInfo | ||
return | SplFileInfo | The deployment flag file information |
public getDirectory ( ) : SplFileInfo | ||
return | SplFileInfo | The deployment directory |
protected getExtensionsToWatch ( ) : array | ||
return | array | The array with the file extensions |
public getInterval ( ) : integer | ||
return | integer | The interval in seconds |
public getLastSuccessfullyDeployment ( SplFileInfo $file ) : integer | ||
$file | SplFileInfo | The deployment directory |
return | integer | The UNIX timestamp with the last successfully deployment date or 0 if no successful deployment has been processed |
protected array $directory | ||
return | array |
protected array $extensionsToWatch | ||
return | array |
protected int $interval | ||
return | integer |