FilesystemOptions
extends AdapterOptions
in package
These are options specific to the Filesystem adapter
Table of Contents
- $__prioritizedProperties__ : array<string|int, string>
- Prioritized properties ordered by prio to be set first in case a bulk of options sets set at once
- $__strictMode__ : bool
- We use the __ prefix to avoid collisions with properties in user-implementations.
- $adapter : null|StorageInterface
- The adapter using these options
- $cacheDir : null|string
- Directory to store cache files
- $clearStatCache : bool
- Call clearstatcache enabled?
- $dirLevel : int
- How much sub-directaries should be created?
- $dirPermission : false|int
- Permission creating new directories
- $fileLocking : bool
- Lock files on writing
- $filePermission : false|int
- Permission creating new files
- $keyPattern : string
- Overwrite default key pattern
- $namespace : string
- Namespace option
- $namespaceSeparator : string
- Namespace separator
- $noAtime : bool
- Don't get 'fileatime' as 'atime' on metadata
- $noCtime : bool
- Don't get 'filectime' as 'ctime' on metadata
- $readable : bool
- Readable option
- $suffix : string
- Suffix for cache files
- $tagSuffix : string
- Suffix for tag files
- $ttl : int|float
- TTL option
- $umask : false|int
- Umask to create files and directories
- $writable : bool
- Writable option
- __construct() : FilesystemOptions
- Constructor
- __get() : mixed
- Get a configuration property
- __isset() : bool
- Test if a configuration property is null
- __set() : void
- Set a configuration property
- __unset() : void
- Set a configuration property to NULL
- getCacheDir() : null|string
- Get cache dir
- getClearStatCache() : bool
- Get clear stat cache
- getDirLevel() : int
- Get dir level
- getDirPermission() : false|int
- Get permission to create directories on unix systems
- getFileLocking() : bool
- Get file locking
- getFilePermission() : false|int
- Get permission to create files on unix systems
- getKeyPattern() : string
- Get key pattern
- getNamespace() : string
- Get namespace
- getNamespaceSeparator() : string
- Get namespace separator
- getNoAtime() : bool
- Get no atime
- getNoCtime() : bool
- Get no ctime
- getReadable() : bool
- If reading data from cache enabled.
- getSuffix() : string
- Get the suffix for cache files
- getTagSuffix() : the
- Get the suffix for tag files
- getTtl() : float
- Get time to live.
- getUmask() : false|int
- Get the umask to create files and directories on unix systems
- getWritable() : bool
- If writing data to cache enabled.
- setAdapter() : AdapterOptions
- Adapter using this instance
- setCacheDir() : FilesystemOptions
- Set cache dir
- setClearStatCache() : FilesystemOptions
- Set clear stat cache
- setDirLevel() : FilesystemOptions
- Set dir level
- setDirPermission() : FilesystemOptions
- Set permission to create directories on unix systems
- setFileLocking() : FilesystemOptions
- Set file locking
- setFilePermission() : FilesystemOptions
- Set permission to create files on unix systems
- setFromArray() : AbstractOptions
- Set one or more configuration properties
- setKeyPattern() : AdapterOptions
- Set key pattern
- setNamespace() : AdapterOptions
- Set namespace.
- setNamespaceSeparator() : FilesystemOptions
- Set namespace separator
- setNoAtime() : FilesystemOptions
- Set no atime
- setNoCtime() : FilesystemOptions
- Set no ctime
- setReadable() : AdapterOptions
- Enable/Disable reading data from cache.
- setSuffix() : mixed
- Set the suffix for cache files
- setTagSuffix() : mixed
- Set the suffix for cache files
- setTtl() : AdapterOptions
- Set time to live.
- setUmask() : FilesystemOptions
- Set the umask to create files and directories on unix systems
- setWritable() : AdapterOptions
- Enable/Disable writing data to cache.
- toArray() : array<string|int, mixed>
- Cast to array
- normalizeTtl() : void
- Validates and normalize a TTL.
- triggerOptionEvent() : void
- Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.
Properties
$__prioritizedProperties__
Prioritized properties ordered by prio to be set first in case a bulk of options sets set at once
protected
array<string|int, string>
$__prioritizedProperties__
= []
$__strictMode__
We use the __ prefix to avoid collisions with properties in user-implementations.
protected
bool
$__strictMode__
= true
$adapter
The adapter using these options
protected
null|StorageInterface
$adapter
$cacheDir
Directory to store cache files
protected
null|string
$cacheDir
= null
The cache directory or NULL for the systems temporary directory
$clearStatCache
Call clearstatcache enabled?
protected
bool
$clearStatCache
= true
$dirLevel
How much sub-directaries should be created?
protected
int
$dirLevel
= 1
$dirPermission
Permission creating new directories
protected
false|int
$dirPermission
= 0700
$fileLocking
Lock files on writing
protected
bool
$fileLocking
= true
$filePermission
Permission creating new files
protected
false|int
$filePermission
= 0600
$keyPattern
Overwrite default key pattern
protected
string
$keyPattern
= '/^[a-z0-9_\\+\\-]*$/Di'
Defined in AdapterOptions
$namespace
Namespace option
protected
string
$namespace
= 'zfcache'
$namespaceSeparator
Namespace separator
protected
string
$namespaceSeparator
= '-'
$noAtime
Don't get 'fileatime' as 'atime' on metadata
protected
bool
$noAtime
= true
$noCtime
Don't get 'filectime' as 'ctime' on metadata
protected
bool
$noCtime
= true
$readable
Readable option
protected
bool
$readable
= true
$suffix
Suffix for cache files
protected
string
$suffix
= 'dat'
$tagSuffix
Suffix for tag files
protected
string
$tagSuffix
= 'tag'
$ttl
TTL option
protected
int|float
$ttl
= 0
0 means infinite or maximum of adapter
$umask
Umask to create files and directories
protected
false|int
$umask
= false
$writable
Writable option
protected
bool
$writable
= true
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|Traversable|null $options = null ]) : FilesystemOptions
Parameters
- $options : array<string|int, mixed>|Traversable|null = null
Tags
Return values
FilesystemOptions —__get()
Get a configuration property
public
__get(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —__isset()
Test if a configuration property is null
public
__isset(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —__set()
Set a configuration property
public
__set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
Tags
Return values
void —__unset()
Set a configuration property to NULL
public
__unset(string $key) : void
Parameters
- $key : string
Tags
Return values
void —getCacheDir()
Get cache dir
public
getCacheDir() : null|string
Return values
null|string —getClearStatCache()
Get clear stat cache
public
getClearStatCache() : bool
Return values
bool —getDirLevel()
Get dir level
public
getDirLevel() : int
Return values
int —getDirPermission()
Get permission to create directories on unix systems
public
getDirPermission() : false|int
Return values
false|int —getFileLocking()
Get file locking
public
getFileLocking() : bool
Return values
bool —getFilePermission()
Get permission to create files on unix systems
public
getFilePermission() : false|int
Return values
false|int —getKeyPattern()
Get key pattern
public
getKeyPattern() : string
Return values
string —getNamespace()
Get namespace
public
getNamespace() : string
Return values
string —getNamespaceSeparator()
Get namespace separator
public
getNamespaceSeparator() : string
Return values
string —getNoAtime()
Get no atime
public
getNoAtime() : bool
Return values
bool —getNoCtime()
Get no ctime
public
getNoCtime() : bool
Return values
bool —getReadable()
If reading data from cache enabled.
public
getReadable() : bool
Return values
bool —getSuffix()
Get the suffix for cache files
public
getSuffix() : string
Return values
string —getTagSuffix()
Get the suffix for tag files
public
getTagSuffix() : the
Return values
the —$tagSuffix
getTtl()
Get time to live.
public
getTtl() : float
Return values
float —getUmask()
Get the umask to create files and directories on unix systems
public
getUmask() : false|int
Return values
false|int —getWritable()
If writing data to cache enabled.
public
getWritable() : bool
Return values
bool —setAdapter()
Adapter using this instance
public
setAdapter([StorageInterface|null $adapter = null ]) : AdapterOptions
Parameters
- $adapter : StorageInterface|null = null
Return values
AdapterOptions —Provides a fluent interface
setCacheDir()
Set cache dir
public
setCacheDir(string $cacheDir) : FilesystemOptions
Parameters
- $cacheDir : string
Tags
Return values
FilesystemOptions —Provides a fluent interface
setClearStatCache()
Set clear stat cache
public
setClearStatCache(bool $clearStatCache) : FilesystemOptions
Parameters
- $clearStatCache : bool
Return values
FilesystemOptions —Provides a fluent interface
setDirLevel()
Set dir level
public
setDirLevel(int $dirLevel) : FilesystemOptions
Parameters
- $dirLevel : int
Tags
Return values
FilesystemOptions —Provides a fluent interface
setDirPermission()
Set permission to create directories on unix systems
public
setDirPermission(false|string|int $dirPermission) : FilesystemOptions
Parameters
- $dirPermission : false|string|int
-
FALSE to disable explicit permission or an octal number
Tags
Return values
FilesystemOptions —Provides a fluent interface
setFileLocking()
Set file locking
public
setFileLocking(bool $fileLocking) : FilesystemOptions
Parameters
- $fileLocking : bool
Return values
FilesystemOptions —Provides a fluent interface
setFilePermission()
Set permission to create files on unix systems
public
setFilePermission(false|string|int $filePermission) : FilesystemOptions
Parameters
- $filePermission : false|string|int
-
FALSE to disable explicit permission or an octal number
Tags
Return values
FilesystemOptions —Provides a fluent interface
setFromArray()
Set one or more configuration properties
public
setFromArray(array<string|int, mixed>|Traversable|AbstractOptions $options) : AbstractOptions
Parameters
- $options : array<string|int, mixed>|Traversable|AbstractOptions
Tags
Return values
AbstractOptions —Provides fluent interface
setKeyPattern()
Set key pattern
public
setKeyPattern(string $keyPattern) : AdapterOptions
Parameters
- $keyPattern : string
Tags
Return values
AdapterOptions —Provides a fluent interface
setNamespace()
Set namespace.
public
setNamespace(string $namespace) : AdapterOptions
Parameters
- $namespace : string
Return values
AdapterOptions —Provides a fluent interface
setNamespaceSeparator()
Set namespace separator
public
setNamespaceSeparator(string $namespaceSeparator) : FilesystemOptions
Parameters
- $namespaceSeparator : string
Return values
FilesystemOptions —Provides a fluent interface
setNoAtime()
Set no atime
public
setNoAtime(bool $noAtime) : FilesystemOptions
Parameters
- $noAtime : bool
Return values
FilesystemOptions —Provides a fluent interface
setNoCtime()
Set no ctime
public
setNoCtime(bool $noCtime) : FilesystemOptions
Parameters
- $noCtime : bool
Return values
FilesystemOptions —setReadable()
Enable/Disable reading data from cache.
public
setReadable(bool $readable) : AdapterOptions
Parameters
- $readable : bool
Return values
AdapterOptions —Provides a fluent interface
setSuffix()
Set the suffix for cache files
public
setSuffix(string $suffix) : mixed
Parameters
- $suffix : string
Return values
mixed —setTagSuffix()
Set the suffix for cache files
public
setTagSuffix(string $tagSuffix) : mixed
Parameters
- $tagSuffix : string
Return values
mixed —setTtl()
Set time to live.
public
setTtl(int|float $ttl) : AdapterOptions
Parameters
- $ttl : int|float
Return values
AdapterOptions —Provides a fluent interface
setUmask()
Set the umask to create files and directories on unix systems
public
setUmask(false|string|int $umask) : FilesystemOptions
Note: On multithreaded webservers it's better to explicit set file and dir permission.
Parameters
- $umask : false|string|int
-
FALSE to disable umask or an octal number
Tags
Return values
FilesystemOptions —setWritable()
Enable/Disable writing data to cache.
public
setWritable(bool $writable) : AdapterOptions
Parameters
- $writable : bool
Return values
AdapterOptions —Provides a fluent interface
toArray()
Cast to array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —normalizeTtl()
Validates and normalize a TTL.
protected
normalizeTtl(int|float &$ttl) : void
Parameters
- $ttl : int|float
Tags
Return values
void —triggerOptionEvent()
Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.
protected
triggerOptionEvent(string $optionName, mixed $optionValue) : void
Parameters
- $optionName : string
- $optionValue : mixed