Factory

package

Default

Methods

Constructs a new template factory with its dependencies.

__construct(\phpDocumentor\Transformer\Template\PathResolver $pathResolver, \JMS\Serializer\Serializer $serializer) 

Arguments

$serializer

\JMS\Serializer\Serializer

Serializer used to convert the XML files to models.

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

createTemplateFromXml(string $xml) : \phpDocumentor\Transformer\Template

Arguments

$xml

string

Response

\phpDocumentor\Transformer\Template

Loads the template definition file from the given path and returns it's contents.

fetchTemplateXmlFromPath(string $path) : string

Arguments

$path

string

Response

string

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

get(string $nameOrPath) : \phpDocumentor\Transformer\Template

Arguments

$nameOrPath

string

Response

\phpDocumentor\Transformer\Template

Returns a list of all template names.

getAllNames() : array<mixed,string>

Response

array<mixed,string>

Returns the path where all templates are stored.

getTemplatePath() : string

Response

string

Constants

TEMPLATE_DEFINITION_FILENAME

TEMPLATE_DEFINITION_FILENAME

Properties

serializer

serializer : \JMS\Serializer\Serializer
var

Type(s)

\JMS\Serializer\Serializer

pathResolver

pathResolver : \phpDocumentor\Transformer\Template\PathResolver