API Documentation

BuildService
in package
uses InteractsWithIO, InteractsWithDirectories

Moves logic from the build command to a service.

Handles the build loop which generates the static site.

Tags
see
BuildSiteCommand

Table of Contents

Properties

$router  : RouteCollection

Methods

__construct()  : mixed
compileStaticPages()  : void
transferMediaAssets()  : void
compilePagesForClass()  : void
getClassPluralName()  : string
getPageTypes()  : array<string|int, HydePage>>
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.

Properties

Methods

__construct()

public __construct(OutputStyle $output) : mixed
Parameters
$output : OutputStyle

transferMediaAssets()

public transferMediaAssets() : void

This method will be replaced by a build task in v2.0

compilePagesForClass()

protected compilePagesForClass(HydePage> $pageClass) : void
Parameters
$pageClass : HydePage>

getClassPluralName()

protected getClassPluralName(string $pageClass) : string
Parameters
$pageClass : string
Return values
string

getPageTypes()

protected getPageTypes() : array<string|int, HydePage>>
Return values
array<string|int, HydePage>>

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