class Twig extends Plugin

Twig linter base. Loads checks and collates messages.

Methods

loadFromFile(SplFileInfo $file)

Load template from SplFileInfo reference, usually from Finder

loadFromString(string $string, string $fileName = 'internal')

Load template from string

loadFromPath(string $path)

Load template from file path

boolean
hasMessages()

Template has lint messages

lint(boolean $ignoreWarnings = false)

Lint template

array
getMessages()

Get lint messages

Details

at line 22
Twig loadFromFile(SplFileInfo $file)

Load template from SplFileInfo reference, usually from Finder

Parameters

SplFileInfo $file

Return Value

Twig

at line 35
Twig loadFromString(string $string, string $fileName = 'internal')

Load template from string

Parameters

string $string
string $fileName

Return Value

Twig

at line 47
Twig loadFromPath(string $path)

Load template from file path

Parameters

string $path

Return Value

Twig

at line 58
boolean hasMessages()

Template has lint messages

Return Value

boolean

at line 68
Twig lint(boolean $ignoreWarnings = false)

Lint template

Parameters

boolean $ignoreWarnings ignore warnings

Return Value

Twig

at line 95
array getMessages()

Get lint messages

Return Value

array of Ceo\Lint\Twig\Message objects