\Phug\Renderer\PartialFileAdapterCacheToolsTrait

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
cacheFileContents()
reInitCompiler()
parseCliDirectoriesInput()
compileAndCache()
normalizePath()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

cacheFileContents()

cacheFileContents(string  $destination, string  $output, array  $importsMap = array()) : boolean

Write the cache file with the given contents and map of imports.

Parameters

string $destination
string $output
array $importsMap

Returns

boolean

reInitCompiler()

reInitCompiler(\Phug\Renderer  $renderer, array  $events) : \Phug\CompilerInterface

Parameters

\Phug\Renderer $renderer
array $events

Throws

\Phug\RendererException

Returns

\Phug\CompilerInterface

parseCliDirectoriesInput()

parseCliDirectoriesInput(string  $directory) : array<mixed,string>

Return directories list from a directory string as it is allowed in CLI: - directory1/x/y - [directory1/x/y,directory2/z] as an array of strings.

Parameters

string $directory

Returns

array<mixed,string>

compileAndCache()

compileAndCache(\Phug\CompilerInterface  $compiler, string  $path, string  $inputFile) : boolean

Compile a file with a given compiler and cache it.

Parameters

\Phug\CompilerInterface $compiler
string $path
string $inputFile

Returns

boolean

normalizePath()

normalizePath(\Phug\CompilerInterface  $compiler, string  $path, string  $directory) : string

Compile a file with a given compiler and cache it.

Parameters

\Phug\CompilerInterface $compiler
string $path
string $directory

Returns

string