API Documentation

GenerateSearch extends PostBuildTask
in package
uses InteractsWithDirectories

Table of Contents

Properties

$message  : string
$exitCode  : int
$output  : OutputStyle|null
$path  : string
$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
getExecutionTimeInMs()  : int|float
getExecutionTimeString()  : string
needsDirectories()  : void
Ensure the supplied directories exist by creating them if they don't.
needsDirectory()  : void
Ensure the supplied directory exist by creating it if it does not.
needsParentDirectory()  : void
Ensure the supplied file's parent directory exists by creating it if it does not.
startClock()  : void
stopClock()  : float

Properties

$message

public static string $message = 'Generating search index'

$exitCode

protected int $exitCode = \Symfony\Component\Console\Command\Command::SUCCESS

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
static

getMessage()

public getMessage() : string
Return values
string

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
throws
BuildTaskSkippedException

withExecutionTime()

Write a fluent message to the output with the execution time of the task.

public withExecutionTime() : static
Return values
static

write()

public write(string $message) : void
Parameters
$message : string

writeln()

public writeln(string $message) : void
Parameters
$message : string

getExecutionTimeInMs()

protected getExecutionTimeInMs() : int|float
Return values
int|float

getExecutionTimeString()

protected getExecutionTimeString() : string
Return values
string

needsDirectories()

Ensure the supplied directories exist by creating them if they don't.

protected static needsDirectories(array<string|int, string> $directories) : void
Parameters
$directories : array<string|int, string>

array with relative file paths to the directories

needsDirectory()

Ensure the supplied directory exist by creating it if it does not.

protected static needsDirectory(string $directory) : void
Parameters
$directory : string

relative file path to the directory

needsParentDirectory()

Ensure the supplied file's parent directory exists by creating it if it does not.

protected static needsParentDirectory(string $file[, int $levels = 1 ]) : void
Parameters
$file : string
$levels : int = 1

        
On this page

Search results