Properties

$autosave

$autosave : bool

Type

bool

$cache

$cache : array

Type

array

$complete

$complete : array

Type

array

$adapter

$adapter : \League\Flysystem\AdapterInterface

Type

AdapterInterface — An adapter

$file

$file : string

Type

string — the file to cache to

$expire

$expire : int|null

Type

int|null — seconds until cache expiration

Methods

__destruct()

__destruct() : mixed

Destructor.

Returns

mixed —

getAutosave()

getAutosave() : bool

Get the autosave setting.

Returns

bool —

autosave

setAutosave()

setAutosave(bool  $autosave) : mixed

Get the autosave setting.

Parameters

bool $autosave

Returns

mixed —

storeContents()

storeContents(string  $directory, array  $contents, bool  $recursive = false) : array

Store the contents listing.

Parameters

string $directory
array $contents
bool $recursive

Returns

array —

contents listing

updateObject()

updateObject(string  $path, array  $object, bool  $autosave = false) : mixed

Update the metadata for an object.

Parameters

string $path

object path

array $object

object metadata

bool $autosave

whether to trigger the autosave routine

Returns

mixed —

storeMiss()

storeMiss(string  $path) : mixed

Store object hit miss.

Parameters

string $path

Returns

mixed —

listContents()

listContents(string  $dirname = '', bool  $recursive = false) : array

Get the contents listing.

Parameters

string $dirname
bool $recursive

Returns

array —

contents listing

has()

has(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

read()

read(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

readStream()

readStream(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

rename()

rename(mixed  $path, mixed  $newpath) : mixed

Rename a file.

Parameters

mixed $path
mixed $newpath

Returns

mixed —

copy()

copy(mixed  $path, mixed  $newpath) : mixed

Copy a file.

Parameters

mixed $path
mixed $newpath

Returns

mixed —

delete()

delete(mixed  $path) : mixed

Delete an object from cache.

Parameters

mixed $path

object path

Returns

mixed —

deleteDir()

deleteDir(mixed  $dirname) : mixed

Delete all objects from from a directory.

Parameters

mixed $dirname

directory path

Returns

mixed —

getMimetype()

getMimetype(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

getSize()

getSize(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

getTimestamp()

getTimestamp(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

getVisibility()

getVisibility(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

getMetadata()

getMetadata(mixed  $path) : mixed

{@inheritdoc}

Parameters

mixed $path

Returns

mixed —

isComplete()

isComplete(mixed  $dirname, mixed  $recursive) : bool

Check whether the directory listing of a given directory is complete.

Parameters

mixed $dirname
mixed $recursive

Returns

bool —

setComplete()

setComplete(mixed  $dirname, mixed  $recursive) : mixed

Set a directory to completely listed.

Parameters

mixed $dirname
mixed $recursive

Returns

mixed —

cleanContents()

cleanContents(array  $contents) : array

Filter the contents from a listing.

Parameters

array $contents

object listing

Returns

array —

filtered contents

flush()

flush() : mixed

Flush the cache.

Returns

mixed —

autosave()

autosave() : mixed

Autosave trigger.

Returns

mixed —

getForStorage()

getForStorage() : string

Retrieve serialized cache data.

Returns

string —

serialized data

setFromStorage()

setFromStorage(mixed  $json) : mixed

Load from serialized cache data.

Parameters

mixed $json

Returns

mixed —

ensureParentDirectories()

ensureParentDirectories(string  $path) : mixed

Ensure parent directories of an object.

Parameters

string $path

object path

Returns

mixed —

__construct()

__construct(\League\Flysystem\AdapterInterface  $adapter, string  $file, int|null  $expire = null) : mixed

Constructor.

Parameters

\League\Flysystem\AdapterInterface $adapter

adapter

string $file

the file to cache to

int|null $expire

seconds until cache expiration

Returns

mixed —

load()

load() : mixed

{@inheritdoc}

Returns

mixed —

save()

save() : mixed

{@inheritdoc}

Returns

mixed —

pathIsInDirectory()

pathIsInDirectory(string  $directory, string  $path) : bool

Determines if the path is inside the directory.

Parameters

string $directory
string $path

Returns

bool —

setExpire()

setExpire(int  $expire) : mixed

Set the expiration time in seconds.

Parameters

int $expire

relative expiration time

Returns

mixed —

getTime()

getTime(int  $time) : int

Get expiration time in seconds.

Parameters

int $time

relative expiration time

Returns

int —

actual expiration time