\Fuman_Template_Processor_Snippet

Processors are used to provide additional functionalities in template

Summary

Methods
Properties
Constants
__construct()
getName()
getParseLevel()
processValue()
getUsages()
addStringSnippet()
addFileSnippet()
No public properties found
No constants found
_getValue()
_isPathAndFileExists()
$_name
$_parseLevel
$_snippets
N/A
No private methods found
No private properties found
N/A

Properties

$_name

$_name : 

Type

$_parseLevel

$_parseLevel : 

Type

$_snippets

$_snippets : array

Type

array

Methods

__construct()

__construct(string  $name, integer  $parseLevel) 

Constructor

Parameters

string $name
integer $parseLevel

getName()

getName() : null

Gets name of processor

Returns

null

getParseLevel()

getParseLevel() : integer

Gets parse level (0-n)

Returns

integer

processValue()

processValue(array  $arguments, object  $parentData) : string

Default parse value implementation

Parameters

array $arguments
object $parentData

Returns

string

getUsages()

getUsages() : array<mixed,\Fuman_Template_Usage>

Gets possible usages

Returns

array<mixed,\Fuman_Template_Usage>

addStringSnippet()

addStringSnippet(string  $key, string  $templateString) 

Parameters

string $key
string $templateString

addFileSnippet()

addFileSnippet(string  $key, string  $templatePath) 

Parameters

string $key
string $templatePath

_getValue()

_getValue(array  $arguments, null|object  $data = null) : null|object

Gets value

Parameters

array $arguments
null|object $data

Returns

null|object

_isPathAndFileExists()

_isPathAndFileExists(  $path) : boolean

Checks if its a path and file exists

Parameters

$path

Returns

boolean