Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
MicroTemplateEngine Class Reference
+ Inheritance diagram for MicroTemplateEngine:

Public Member Functions

 __construct ()
 
 render (string $viewName, ?array $pData=[], bool $asString=false)
 Renders a view.
 
 getBlockNames (string $templateName)
 Returns the defined block names.
 
 getCode (string $templateName)
 Returns the source code of the template.
 
 exists (string $name)
 Checks if we have the source code of a template, given its name.
 
 addFunction (string $name, $callback, array $options=[])
 
 getGenerator ()
 
- Public Member Functions inherited from TemplateEngine
 setTheme (string $theme, string $themeFolder=ThemesManager::THEMES_FOLDER)
 Defines the activeTheme.
 
 generateTemplateSourceFromFile (string $templateName)
 Generates the source for this engine from a twig model template.
 
 generateTemplateSource (string $source)
 

Protected Member Functions

 addFilter (string $name, $callback, array $options=[])
 
 addExtension ($extension)
 
- Protected Member Functions inherited from TemplateEngine
 hasThemeResource (&$resource)
 
 addFunctions ()
 
 safeString (string $str)
 

Private Member Functions

 getTemplateParser (string $viewName)
 

Private Attributes

string $viewsFolder
 
array $parsers = []
 

Additional Inherited Members

- Protected Attributes inherited from TemplateEngine
Framework $fw
 

Detailed Description

Definition at line 9 of file MicroTemplateEngine.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 20 of file MicroTemplateEngine.php.

Member Function Documentation

◆ addExtension()

addExtension (   $extension)
protected

Reimplemented from TemplateEngine.

Definition at line 61 of file MicroTemplateEngine.php.

◆ addFilter()

addFilter ( string  $name,
  $callback,
array  $options = [] 
)
protected
Parameters
string$name
$callback
array$options
Returns
void

Reimplemented from TemplateEngine.

Definition at line 57 of file MicroTemplateEngine.php.

◆ addFunction()

addFunction ( string  $name,
  $callback,
array  $options = [] 
)
Parameters
string$name
$callback
array$options
Returns
void

Reimplemented from TemplateEngine.

Definition at line 53 of file MicroTemplateEngine.php.

◆ exists()

exists ( string  $name)

Checks if we have the source code of a template, given its name.

Parameters
string$name
Returns
boolean

Reimplemented from TemplateEngine.

Definition at line 48 of file MicroTemplateEngine.php.

◆ getBlockNames()

getBlockNames ( string  $templateName)

Returns the defined block names.

Parameters
string$templateName

Reimplemented from TemplateEngine.

Definition at line 39 of file MicroTemplateEngine.php.

◆ getCode()

getCode ( string  $templateName)

Returns the source code of the template.

Parameters
string$templateName

Reimplemented from TemplateEngine.

Definition at line 43 of file MicroTemplateEngine.php.

◆ getGenerator()

getGenerator ( )

Reimplemented from TemplateEngine.

Definition at line 65 of file MicroTemplateEngine.php.

◆ getTemplateParser()

getTemplateParser ( string  $viewName)
private

Definition at line 13 of file MicroTemplateEngine.php.

◆ render()

render ( string  $viewName,
?array  $pData = [],
bool  $asString = false 
)

Renders a view.

Parameters
string$viewName
array | null$pData
boolean$asString

Reimplemented from TemplateEngine.

Definition at line 28 of file MicroTemplateEngine.php.

Field Documentation

◆ $parsers

array $parsers = []
private

Definition at line 11 of file MicroTemplateEngine.php.

◆ $viewsFolder

string $viewsFolder
private

Definition at line 10 of file MicroTemplateEngine.php.


The documentation for this class was generated from the following file: