phpDocumentor

Factory
in package

Table of Contents

TEMPLATE_DEFINITION_FILENAME  = 'template.xml'
$flySystemFactory  : FlySystemFactory
$globalTemplatesPath  : string
__construct()  : mixed
Constructs a new template factory with its dependencies.
get()  : Template
Attempts to find, construct and return a template object with the given template name or (relative/absolute) path.
getAllNames()  : array<string|int, string>
Returns a list of all template names.
getTemplatesPath()  : string
Returns the path where all templates are stored.
createTemplateFromXml()  : Template
Creates and returns a template object based on the provided template definition.
createNewFilesystemFromSubfolder()  : Filesystem
resolve()  : FilesystemInterface

Constants

TEMPLATE_DEFINITION_FILENAME

public mixed TEMPLATE_DEFINITION_FILENAME = 'template.xml'

Properties

$globalTemplatesPath

private string $globalTemplatesPath

Methods

__construct()

Constructs a new template factory with its dependencies.

public __construct(FlySystemFactory $flySystemFactory, string $globalTemplatesPath) : mixed
Parameters
$flySystemFactory : FlySystemFactory
$globalTemplatesPath : string
Return values
mixed

get()

Attempts to find, construct and return a template object with the given template name or (relative/absolute) path.

public get(Transformer $transformer, string $nameOrPath) : Template
Parameters
$transformer : Transformer
$nameOrPath : string
Return values
Template

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

createTemplateFromXml()

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

protected createTemplateFromXml(Transformer $transformer, string $nameOrPath) : Template
Parameters
$transformer : Transformer
$nameOrPath : string
Return values
Template

createNewFilesystemFromSubfolder()

private createNewFilesystemFromSubfolder(Filesystem $hostFilesystem, string $subfolder) : Filesystem
Parameters
$hostFilesystem : Filesystem
$subfolder : string
Return values
Filesystem

resolve()

private resolve(Transformer $transformer, string $nameOrPath) : FilesystemInterface
Parameters
$transformer : Transformer
$nameOrPath : string
Return values
FilesystemInterface

Search results