Property | Type | Description | |
---|---|---|---|
$loader | Twig_LoaderInterface | The wrapped Twig loader | |
$sourceAdapters | array | Items are strings or callbacks | |
$twital | The internal Twital compiler |
Method | Description | |
---|---|---|
__construct ( Twig_LoaderInterface $loader = null, |
Creates a new Twital loader. | |
addSourceAdapter ( string | callback $pattern, Goetas\Twital\SourceAdapter $adapter ) : |
Add a new pattern that can decide if a template is twital-compilable or not. | |
exists ( $name ) | ||
getCacheKey ( $name ) | ||
getLoader ( ) : Twig_LoaderInterface | Get the wrapped Twig loader | |
getSource ( $name ) | ||
getSourceAdapter ( string $name ) : Goetas\Twital\SourceAdapter | Decide if a template is twital-compilable or not. | |
getSourceAdapters ( ) : array: | Get all patterns used to choose if a template is twital-compilable or not | |
getTwital ( ) : |
||
isFresh ( $name, $time ) | ||
setLoader ( Twig_LoaderInterface $loader ) : |
Set the wrapped Twig loader |
public __construct ( Twig_LoaderInterface $loader = null, |
||
$loader | Twig_LoaderInterface | |
$twital | ||
$addDefaults | boolean | If NULL, some standard rules will be used (`*.twital.*` and `*.twital`). |
public addSourceAdapter ( string | callback $pattern, Goetas\Twital\SourceAdapter $adapter ) : |
||
$pattern | string | callback | |
$adapter | Goetas\Twital\SourceAdapter | |
return |
public getLoader ( ) : Twig_LoaderInterface | ||
return | Twig_LoaderInterface |
public getSourceAdapter ( string $name ) : Goetas\Twital\SourceAdapter | ||
$name | string | |
return | Goetas\Twital\SourceAdapter |
public getSourceAdapters ( ) : array: | ||
return | array: |
public setLoader ( Twig_LoaderInterface $loader ) : |
||
$loader | Twig_LoaderInterface | |
return |
protected Twig_LoaderInterface $loader | ||
return | Twig_LoaderInterface |
protected array $sourceAdapters | ||
return | array |