Constants

TEMPLATE_DEFINITION_FILENAME

TEMPLATE_DEFINITION_FILENAME = 'template.xml'

Properties

$flySystemFactory

$flySystemFactory : \phpDocumentor\Parser\FlySystemFactory

Type

FlySystemFactory

$globalTemplatesPath

$globalTemplatesPath : string

Type

string

$writerCollection

$writerCollection : \phpDocumentor\Transformer\Writer\Collection

Type

Collection

Methods

__construct()

__construct(\phpDocumentor\Transformer\Writer\Collection  $writerCollection, \phpDocumentor\Parser\FlySystemFactory  $flySystemFactory, string  $globalTemplatesPath) : mixed

Constructs a new template factory with its dependencies.

Parameters

\phpDocumentor\Transformer\Writer\Collection $writerCollection
\phpDocumentor\Parser\FlySystemFactory $flySystemFactory
string $globalTemplatesPath

Returns

mixed —

getTemplates()

getTemplates(array  $templates, \League\Flysystem\FilesystemInterface  $output) : \phpDocumentor\Transformer\Template\Collection

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

Parameters

array $templates
\League\Flysystem\FilesystemInterface $output

Returns

\phpDocumentor\Transformer\Template\Collection —

getAllNames()

getAllNames() : string[]

Returns a list of all template names.

Returns

string[] —

getTemplatesPath()

getTemplatesPath() : string

Returns the path where all templates are stored.

Returns

string —

loadTemplate()

loadTemplate(\League\Flysystem\FilesystemInterface  $output, string  $template, array<string,string>  $parameters) : \phpDocumentor\Transformer\Template

Parameters

\League\Flysystem\FilesystemInterface $output
string $template
array $parameters

Returns

\phpDocumentor\Transformer\Template —

createTemplateFromXml()

createTemplateFromXml(\League\Flysystem\FilesystemInterface  $filesystem, string  $nameOrPath, array<string,string>  $templateParams) : \phpDocumentor\Transformer\Template

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

Parameters

\League\Flysystem\FilesystemInterface $filesystem
string $nameOrPath
array $templateParams

Returns

\phpDocumentor\Transformer\Template —

resolve()

resolve(string  $nameOrPath) : \League\Flysystem\FilesystemInterface

Parameters

string $nameOrPath

Returns

\League\Flysystem\FilesystemInterface —

getTemplatesDirectory()

getTemplatesDirectory() : \League\Flysystem\Filesystem

Returns

\League\Flysystem\Filesystem —

createNewFilesystemFromSubfolder()

createNewFilesystemFromSubfolder(\League\Flysystem\Filesystem  $hostFilesystem, string  $subfolder) : \League\Flysystem\Filesystem

Parameters

\League\Flysystem\Filesystem $hostFilesystem
string $subfolder

Returns

\League\Flysystem\Filesystem —