CleanSiteDirectory
extends PreBuildTask
in package
Table of Contents
Properties
- $exitCode : int
- $message : string
- $output : OutputStyle|null
- $timeStart : float
Methods
- createdSiteFile() : static
- Write a fluent message to the output that the task created the specified file.
- getMessage() : string
- handle() : void
- printFinishMessage() : void
- printStartMessage() : void
- run() : int
- This method is called by the BuildTaskService. It will run the task using the handle method, as well as write output to the console, and handle any exceptions that may occur.
- skip() : void
- Write a fluent message to the output that the task is skipping and halt the execution.
- withExecutionTime() : static
- Write a fluent message to the output with the execution time of the task.
- write() : void
- writeln() : void
- askIfUnsafeDirectoryShouldBeEmptied() : bool
- getExecutionTimeInMs() : int|float
- getExecutionTimeString() : string
- isItSafeToCleanOutputDirectory() : bool
- isOutputDirectoryWhitelisted() : bool
- safeOutputDirectories() : array<string|int, string>
- startClock() : void
- stopClock() : float
Properties
$exitCode
protected
int
$exitCode
= \Symfony\Component\Console\Command\Command::SUCCESS
$message
protected
static string
$message
= 'Removing all files from build directory'
$output
protected
OutputStyle|null
$output
$timeStart
protected
float
$timeStart
Methods
createdSiteFile()
Write a fluent message to the output that the task created the specified file.
public
createdSiteFile(string $path) : static
Parameters
- $path : string
Return values
staticgetMessage()
public
getMessage() : string
Return values
stringhandle()
public
handle() : void
printFinishMessage()
public
printFinishMessage() : void
printStartMessage()
public
printStartMessage() : void
run()
This method is called by the BuildTaskService. It will run the task using the handle method, as well as write output to the console, and handle any exceptions that may occur.
public
run([OutputStyle|null $output = null ]) : int
Parameters
- $output : OutputStyle|null = null
Return values
int —The exit code of the task. This can be used when calling a task directly from a command.
skip()
Write a fluent message to the output that the task is skipping and halt the execution.
public
skip([string $reason = 'Task was skipped' ]) : void
Parameters
- $reason : string = 'Task was skipped'
Tags
withExecutionTime()
Write a fluent message to the output with the execution time of the task.
public
withExecutionTime() : static
Return values
staticwrite()
public
write(string $message) : void
Parameters
- $message : string
writeln()
public
writeln(string $message) : void
Parameters
- $message : string
askIfUnsafeDirectoryShouldBeEmptied()
protected
askIfUnsafeDirectoryShouldBeEmptied() : bool
Return values
boolgetExecutionTimeInMs()
protected
getExecutionTimeInMs() : int|float
Return values
int|floatgetExecutionTimeString()
protected
getExecutionTimeString() : string
Return values
stringisItSafeToCleanOutputDirectory()
protected
isItSafeToCleanOutputDirectory() : bool
Return values
boolisOutputDirectoryWhitelisted()
protected
isOutputDirectoryWhitelisted() : bool
Return values
boolsafeOutputDirectories()
protected
safeOutputDirectories() : array<string|int, string>
Return values
array<string|int, string>startClock()
protected
startClock() : void
stopClock()
protected
stopClock() : float