TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Fluid\Service\AbstractGenerator Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\Service\AbstractGenerator:
TYPO3\CMS\Fluid\Service\DocbookGenerator TYPO3\CMS\Fluid\Compatibility\DocbookGeneratorService

Public Member Functions

 __construct ()
 

Protected Member Functions

 getClassNamesInNamespace ($namespace)
 
 getTagNameForClass ($className, $namespace)
 
 addChildWithCData (\SimpleXMLElement $parentXmlNode, $childNodeName, $childNodeValue)
 

Protected Attributes

 $abstractViewHelperReflectionClass
 
 $docCommentParser
 
 $reflectionService
 

Detailed Description

Common base class for XML generators.

Definition at line 17 of file AbstractGenerator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\Service\AbstractGenerator::__construct ( )

Constructor. Sets $this->abstractViewHelperReflectionClass

Definition at line 44 of file AbstractGenerator.php.

References TYPO3\CMS\Fluid\Fluid\$debugMode.

Member Function Documentation

◆ addChildWithCData()

TYPO3\CMS\Fluid\Service\AbstractGenerator::addChildWithCData ( \SimpleXMLElement  $parentXmlNode,
  $childNodeName,
  $childNodeValue 
)
protected

Add a child node to $parentXmlNode, and wrap the contents inside a CDATA section.

Parameters
\SimpleXMLElement$parentXmlNodeParent XML Node to add the child to
string$childNodeNameName of the child node
string$childNodeValueValue of the child node. Will be placed inside CDATA.
Returns
the new element

Definition at line 106 of file AbstractGenerator.php.

Referenced by TYPO3\CMS\Fluid\Service\DocbookGenerator\addText().

◆ getClassNamesInNamespace()

TYPO3\CMS\Fluid\Service\AbstractGenerator::getClassNamesInNamespace (   $namespace)
protected

Get all class names inside this namespace and return them as array.

Parameters
string$namespace
Returns
array Array of all class names inside a given namespace.

Definition at line 56 of file AbstractGenerator.php.

Referenced by TYPO3\CMS\Fluid\Service\DocbookGenerator\generateDocbook().

◆ getTagNameForClass()

TYPO3\CMS\Fluid\Service\AbstractGenerator::getTagNameForClass (   $className,
  $namespace 
)
protected

Get a tag name for a given ViewHelper class. Example: For the View Helper TYPO3, and the namespace prefix TYPO3\, this method returns "form.select".

Parameters
string$classNameClass name
string$namespaceBase namespace to use
Returns
string Tag name

Strip namespace from the beginning and "ViewHelper" from the end of the class name

Definition at line 82 of file AbstractGenerator.php.

References TYPO3\CMS\Fluid\Fluid\NAMESPACE_SEPARATOR.

Referenced by TYPO3\CMS\Fluid\Service\DocbookGenerator\generateXmlForClassName().

Member Data Documentation

◆ $abstractViewHelperReflectionClass

TYPO3\CMS\Fluid\Service\AbstractGenerator::$abstractViewHelperReflectionClass
protected

Definition at line 24 of file AbstractGenerator.php.

◆ $docCommentParser

TYPO3\CMS\Fluid\Service\AbstractGenerator::$docCommentParser
protected

Definition at line 32 of file AbstractGenerator.php.

◆ $reflectionService

TYPO3\CMS\Fluid\Service\AbstractGenerator::$reflectionService
protected

Definition at line 38 of file AbstractGenerator.php.