PHP Класс Go\Instrument\ClassLoading\CachePathManager

Can be extended to get a more sophisticated real-to-cached code mapping
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$appDir string | null
$cacheDir string | null
$cacheState array Cached metadata for transformation state for the concrete file
$fileMode integer File mode
$kernel Go\Core\AspectKernel
$newCacheState array New metadata items, that was not present in $cacheState
$options array

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

Метод Описание
__construct ( AspectKernel $kernel )
__destruct ( ) Automatic destructor saves all new changes into the cache
flushCacheState ( ) Flushes the cache state into the file
getCacheDir ( ) : null | string Returns current cache directory for aspects, can be bull
getCachePathForResource ( string $resource ) : boolean | string
queryCacheState ( string | null $resource = null ) : array | null Tries to return an information for queried resource
setCacheDir ( string $cacheDir ) Configures a new cache directory for aspects
setCacheState ( string $resource, array $metadata ) Put a record about some resource in the cache

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

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

public __construct ( AspectKernel $kernel )
$kernel Go\Core\AspectKernel

__destruct() публичный Метод

This implementation is not thread-safe, so be care
public __destruct ( )

flushCacheState() публичный Метод

Flushes the cache state into the file
public flushCacheState ( )

getCacheDir() публичный Метод

Returns current cache directory for aspects, can be bull
public getCacheDir ( ) : null | string
Результат null | string

getCachePathForResource() публичный Метод

public getCachePathForResource ( string $resource ) : boolean | string
$resource string
Результат boolean | string

queryCacheState() публичный Метод

Tries to return an information for queried resource
public queryCacheState ( string | null $resource = null ) : array | null
$resource string | null Name of the file or null to get all information
Результат array | null Information or null if no record in the cache

setCacheDir() публичный Метод

Configures a new cache directory for aspects
public setCacheDir ( string $cacheDir )
$cacheDir string New cache directory

setCacheState() публичный Метод

This data will be persisted during object destruction
public setCacheState ( string $resource, array $metadata )
$resource string Name of the file
$metadata array Miscellaneous information about resource

Описание свойств

$appDir защищенное свойство

protected string|null $appDir
Результат string | null

$cacheDir защищенное свойство

protected string|null $cacheDir
Результат string | null

$cacheState защищенное свойство

Cached metadata for transformation state for the concrete file
protected array $cacheState
Результат array

$fileMode защищенное свойство

File mode
protected int $fileMode
Результат integer

$kernel защищенное свойство

protected AspectKernel,Go\Core $kernel
Результат Go\Core\AspectKernel

$newCacheState защищенное свойство

New metadata items, that was not present in $cacheState
protected array $newCacheState
Результат array

$options защищенное свойство

protected array $options
Результат array