Skip to content

Latest commit

 

History

History
341 lines (228 loc) · 8.93 KB

MainExtension.md

File metadata and controls

341 lines (228 loc) · 8.93 KB

BumbleDocGen / Technical description of the project / Class map / MainExtension


MainExtension class:

namespace BumbleDocGen\Core\Renderer\Twig;

final class MainExtension extends \Twig\Extension\AbstractExtension
This is an extension that is used to generate documents from templates

Initialization methods:

  1. __construct

Methods:

  1. getFilters - List of twig filters
  2. getFunctions - List of twig functions
  3. getLanguageHandlersCollection
  4. getNodeVisitors - Returns the node visitor instances to add to the existing list.
  5. getOperators - Returns a list of operators to add to the existing list.
  6. getTests - Returns a list of tests to add to the existing list.
  7. getTokenParsers - Returns the token parser instances to add to the existing list.
  8. setDefaultFilters
  9. setDefaultFunctions

Method details:

public function __construct(\BumbleDocGen\Core\Renderer\Context\RendererContext $context, \BumbleDocGen\Core\Configuration\Configuration $configuration);

Parameters:

Name Type Description
$context \BumbleDocGen\Core\Renderer\Context\RendererContext -
$configuration \BumbleDocGen\Core\Configuration\Configuration -

Throws:


public function getFilters(): \Generator;
List of twig filters

Parameters: not specified

Return value: \Generator


public function getFunctions(): \Generator;
List of twig functions

Parameters: not specified

Return value: \Generator


public function getLanguageHandlersCollection(): \BumbleDocGen\LanguageHandler\LanguageHandlersCollection;

Parameters: not specified

Return value: \BumbleDocGen\LanguageHandler\LanguageHandlersCollection

Throws:


// Implemented in Twig\Extension\AbstractExtension

public function getNodeVisitors(): \Twig\NodeVisitor\NodeVisitorInterface[];
Returns the node visitor instances to add to the existing list.

Parameters: not specified

Return value: \Twig\NodeVisitor\NodeVisitorInterface[]


// Implemented in Twig\Extension\AbstractExtension

public function getOperators(): array[];
Returns a list of operators to add to the existing list.

Parameters: not specified

Return value: array[]


// Implemented in Twig\Extension\AbstractExtension

public function getTests(): \Twig\TwigTest[];
Returns a list of tests to add to the existing list.

Parameters: not specified

Return value: \Twig\TwigTest[]


// Implemented in Twig\Extension\AbstractExtension

public function getTokenParsers(): \Twig\TokenParser\TokenParserInterface[];
Returns the token parser instances to add to the existing list.

Parameters: not specified

Return value: \Twig\TokenParser\TokenParserInterface[]


public function setDefaultFilters(): void;

Parameters: not specified

Return value: void

Throws:


public function setDefaultFunctions(): void;

Parameters: not specified

Return value: void

Throws: