phpDocumentor

Factory

Table of Contents

Constants

TEMPLATE_DEFINITION_FILENAME  : mixed = 'template.xml'

Properties

$flySystemFactory  : FlySystemFactory
$globalTemplatesPath  : string
$writerCollection  : Collection

Methods

__construct()  : mixed
Constructs a new template factory with its dependencies.
getAllNames()  : array<string|int, string>
Returns a list of all template names.
getTemplates()  : Collection
Attempts to find, construct and return a template object with the given template name or (relative/absolute) path.
getTemplatesPath()  : string
Returns the path where all templates are stored.
createNewFilesystemFromSubfolder()  : FileSystem
createTemplateFromXml()  : Template
Creates and returns a template object based on the provided template definition.
getTemplatesDirectory()  : FileSystem
loadTemplate()  : Template
resolve()  : FileSystem

Constants

TEMPLATE_DEFINITION_FILENAME

public final mixed TEMPLATE_DEFINITION_FILENAME = 'template.xml'

Properties

$globalTemplatesPath read-only

private string $globalTemplatesPath

Methods

__construct()

Constructs a new template factory with its dependencies.

public __construct(Collection $writerCollection, FlySystemFactory $flySystemFactory, string $globalTemplatesPath) : mixed
Parameters
$writerCollection : Collection
$flySystemFactory : FlySystemFactory
$globalTemplatesPath : string

getAllNames()

Returns a list of all template names.

public getAllNames() : array<string|int, string>
Return values
array<string|int, string>

getTemplatesPath()

Returns the path where all templates are stored.

public getTemplatesPath() : string
Return values
string

createNewFilesystemFromSubfolder()

private createNewFilesystemFromSubfolder(string $subfolder) : FileSystem
Parameters
$subfolder : string
Return values
FileSystem

createTemplateFromXml()

Creates and returns a template object based on the provided template definition.

private createTemplateFromXml(string $nameOrPath, array<string, string> $templateParams) : Template
Parameters
$nameOrPath : string
$templateParams : array<string, string>
Return values
Template

getTemplatesDirectory()

private getTemplatesDirectory() : FileSystem
Return values
FileSystem

loadTemplate()

private loadTemplate(string $template, array<string, string> $parameters) : Template
Parameters
$template : string
$parameters : array<string, string>
Return values
Template

resolve()

private resolve(string $nameOrPath) : FileSystem
Parameters
$nameOrPath : string
Return values
FileSystem

        
On this page

Search results