ProjectDescriptorMapper
Maps a projectDescriptor to and from a cache instance.
Table of Contents
Constants
- FILE_LIST : mixed = 'phpDocumentor-projectDescriptor-filelist'
- FILE_PREFIX : mixed = 'phpDocumentor-projectDescriptor-files-'
- KEY_SETTINGS : mixed = '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(VersionInterface $version, ApiDocumentationSet $apiSet, array<string|int, File> $files) : void
Parameters
- $version : VersionInterface
- $apiSet : ApiDocumentationSet
- $files : array<string|int, File>
populate()
Returns the Project Descriptor from the cache.
public
populate(ProjectInterface $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectInterface
save()
Stores a Project Descriptor in the Cache.
public
save(ProjectInterface $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectInterface
getApiSetFileKey()
private
getApiSetFileKey(string $fileListKey, string $path) : string
Parameters
- $fileListKey : string
- $path : string
Return values
stringgetApiSetFileListCacheKey()
private
getApiSetFileListCacheKey(VersionInterface $version, ApiDocumentationSet $apiSet) : string
Parameters
- $version : VersionInterface
- $apiSet : ApiDocumentationSet
Return values
stringloadCacheItemAsSettings()
private
loadCacheItemAsSettings(ProjectInterface $projectDescriptor) : void
Parameters
- $projectDescriptor : ProjectInterface
populateApiSet()
private
populateApiSet(VersionInterface $version, ApiDocumentationSet $apiSet) : void
Parameters
- $version : VersionInterface
- $apiSet : ApiDocumentationSet
populateVersion()
private
populateVersion(VersionInterface $version) : void
Parameters
- $version : VersionInterface
saveApiSet()
private
saveApiSet(VersionInterface $version, ApiDocumentationSet $apiSet) : void
Parameters
- $version : VersionInterface
- $apiSet : ApiDocumentationSet
saveVersion()
private
saveVersion(VersionInterface $version) : void
Parameters
- $version : VersionInterface