ProjectDescriptorMapper
in package
Maps a projectDescriptor to and from a cache instance.
Table of Contents
Constants
- FILE_LIST = 'phpDocumentor-projectDescriptor-filelist'
- FILE_PREFIX = 'phpDocumentor-projectDescriptor-files-'
- KEY_SETTINGS = 'phpDocumentor-projectDescriptor-settings'
Properties
- $cache : CacheItemPoolInterface
Methods
- __construct() : mixed
- Initializes this mapper with the given cache instance.
- garbageCollect() : void
- Removes all files in cache that do not occur in the given FileSet Collection.
- populate() : void
- Returns the Project Descriptor from the cache.
- save() : void
- Stores a Project Descriptor in the Cache.
- getApiSetFileKey() : string
- getApiSetFileListCacheKey() : string
- loadCacheItemAsSettings() : void
- populateApiSet() : void
- populateVersion() : void
- saveApiSet() : void
- saveVersion() : void
Constants
FILE_LIST
public
final mixed
FILE_LIST
= 'phpDocumentor-projectDescriptor-filelist'
FILE_PREFIX
public
final mixed
FILE_PREFIX
= 'phpDocumentor-projectDescriptor-files-'
KEY_SETTINGS
public
final mixed
KEY_SETTINGS
= 'phpDocumentor-projectDescriptor-settings'
Properties
$cache read-only
private
CacheItemPoolInterface
$cache
Methods
__construct()
Initializes this mapper with the given cache instance.
public
__construct(CacheItemPoolInterface $cache) : mixed
Parameters
- $cache : CacheItemPoolInterface
garbageCollect()
Removes all files in cache that do not occur in the given FileSet Collection.
public
garbageCollect(VersionDescriptor $version, ApiSetDescriptor $apiSet, array<string|int, File> $files) : void
Parameters
- $version : VersionDescriptor
- $apiSet : ApiSetDescriptor
- $files : array<string|int, File>
populate()
Returns the Project Descriptor from the cache.
public
populate(ProjectDescriptor $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectDescriptor
save()
Stores a Project Descriptor in the Cache.
public
save(ProjectDescriptor $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectDescriptor
getApiSetFileKey()
private
getApiSetFileKey(string $fileListKey, string $path) : string
Parameters
- $fileListKey : string
- $path : string
Return values
stringgetApiSetFileListCacheKey()
private
getApiSetFileListCacheKey(VersionDescriptor $version, ApiSetDescriptor $apiSet) : string
Parameters
- $version : VersionDescriptor
- $apiSet : ApiSetDescriptor
Return values
stringloadCacheItemAsSettings()
private
loadCacheItemAsSettings(ProjectDescriptor $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectDescriptor
populateApiSet()
private
populateApiSet(VersionDescriptor $version, ApiSetDescriptor $apiSet) : void
Parameters
- $version : VersionDescriptor
- $apiSet : ApiSetDescriptor
populateVersion()
private
populateVersion(VersionDescriptor $version) : void
Parameters
- $version : VersionDescriptor
saveApiSet()
private
saveApiSet(VersionDescriptor $version, ApiSetDescriptor $apiSet) : void
Parameters
- $version : VersionDescriptor
- $apiSet : ApiSetDescriptor
saveVersion()
private
saveVersion(VersionDescriptor $version) : void
Parameters
- $version : VersionDescriptor