class TemplateCacheResolver (View source)

Methods

__construct(LoggerInterface $logger)

No description

string|null
resolve(string $configuredPath)

Resolves the compiled-template cache directory, creating it if needed.

Details

__construct(LoggerInterface $logger)

No description

Parameters

LoggerInterface $logger

string|null resolve(string $configuredPath)

Resolves the compiled-template cache directory, creating it if needed.

Returns null when the directory cannot be used - callers then render uncached, so a misconfigured path degrades instead of failing.

Parameters

string $configuredPath

Configured directory; empty selects var/cache/twig under the app root

Return Value

string|null

The usable cache directory, or null to run uncached