PHP Класс Webiny\Component\Rest\Compiler\Cache

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Webiny\Component\Rest\Compiler\CacheDrivers\CacheDriverInterface $cacheDriver ) Base constructor.
deleteCache ( $api, $class )
getCacheContent ( $api, $class, $version ) : array Returns the contents of an existing cache file in form of an array.
isCacheValid ( string $api, string $class ) : boolean Checks if a cache file is valid.
writeCacheFile ( $api, $class, $version, $cacheArray ) Save the compiled cache array.

Описание методов

__construct() публичный метод

Base constructor.
public __construct ( Webiny\Component\Rest\Compiler\CacheDrivers\CacheDriverInterface $cacheDriver )
$cacheDriver Webiny\Component\Rest\Compiler\CacheDrivers\CacheDriverInterface

deleteCache() публичный метод

public deleteCache ( $api, $class )
$api Name of the API.
$class Name of the class.

getCacheContent() публичный метод

Returns the contents of an existing cache file in form of an array.
public getCacheContent ( $api, $class, $version ) : array
$api Name of the API.
$class Name of the class.
$version Version of the class.
Результат array

isCacheValid() публичный метод

A valid file is considered and existing cache file that has a newer creation time, than the modify time, of an api class that the cache file belongs to.
public isCacheValid ( string $api, string $class ) : boolean
$api string Name of the rest api configuration.
$class string Fully qualified class name.
Результат boolean True if cache file is valid, otherwise false.

writeCacheFile() публичный метод

Save the compiled cache array.
public writeCacheFile ( $api, $class, $version, $cacheArray )
$api Name of the API.
$class Name of the class.
$version Version of the class.
$cacheArray The compiled class cache array.