Factory

in package

Constants

mixed TEMPLATE_DEFINITION_FILENAME = 'template.xml'

Properties

private$flySystemFactory  : \phpDocumentor\Parser\FlySystemFactory                

private$globalTemplatesPath  : string                

Methods

Constructs a new template factory with its dependencies.

public__construct(FlySystemFactory $flySystemFactory, string $globalTemplatesPath) : mixed

Parameters

$flySystemFactory : FlySystemFactory
$globalTemplatesPath : string

Returns

mixed

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

publicget(Transformer $transformer, string $nameOrPath) : Template

Parameters

$transformer : Transformer
$nameOrPath : string

Returns

Template

Returns a list of all template names.

publicgetAllNames() : string[]

Returns

string[]

Returns the path where all templates are stored.

publicgetTemplatesPath() : string

Returns

string

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

protectedcreateTemplateFromXml(Transformer $transformer, string $nameOrPath) : Template

Parameters

$transformer : Transformer
$nameOrPath : string

Returns

Template

privateresolve(Transformer $transformer, string $nameOrPath) : FilesystemInterface

Parameters

$transformer : Transformer
$nameOrPath : string

Returns

FilesystemInterface

privatecreateNewFilesystemFromSubfolder(Filesystem $hostFilesystem, string $subfolder) : Filesystem

Parameters

$hostFilesystem : Filesystem
$subfolder : string

Returns

Filesystem