ManifestCache stores data in a local disk cache

Protected Properties

protected bool $useManifest

useManifest or not

protected string|null $manifestPath

protected array $manifest

manifest of loaded items

protected bool $manifestLoaded

manifestLoaded if manifest is loaded

protected bool $manifestDirty

manifestDirty if manifest needs to be written

Public Methods

public __construct()

public __construct(): void

__construct creates a new package manifest instance

public build()

public build(): void

build the manifest and write it to disk

public forget()

public forget(array|string $key): void 

forget a manifest value

public get()

public get(string $key, mixed $default = null): mixed 

get the specified manifest value.

public has()

public has(string $key): bool 

has determines if the given manifest value exists.

public put()

public put(array|string $key, mixed $value = null): void 

set a given manifest value.

Protected Methods

protected ensureManifestIsLoaded()

protected ensureManifestIsLoaded(): void

ensureManifestIsLoaded has been loaded into memory

protected write()

protected write($manifest): void

write the given manifest array to disk