Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
FilesystemOptions Class Reference

These are options specific to the Filesystem adapter. More...

Public Member Functions

 __construct ($options=null)
 Constructor.
 
 setCacheDir ($cacheDir)
 Set cache dir.
 
 getCacheDir ()
 Get cache dir.
 
 setClearStatCache ($clearStatCache)
 Set clear stat cache.
 
 getClearStatCache ()
 Get clear stat cache.
 
 setDirLevel ($dirLevel)
 Set dir level.
 
 getDirLevel ()
 Get dir level.
 
 setDirPermission ($dirPermission)
 Set permission to create directories on unix systems.
 
 getDirPermission ()
 Get permission to create directories on unix systems.
 
 setFileLocking ($fileLocking)
 Set file locking.
 
 getFileLocking ()
 Get file locking.
 
 setFilePermission ($filePermission)
 Set permission to create files on unix systems.
 
 getFilePermission ()
 Get permission to create files on unix systems.
 
 setNamespaceSeparator ($namespaceSeparator)
 Set namespace separator.
 
 getNamespaceSeparator ()
 Get namespace separator.
 
 setNoAtime ($noAtime)
 Set no atime.
 
 getNoAtime ()
 Get no atime.
 
 setNoCtime ($noCtime)
 Set no ctime.
 
 getNoCtime ()
 Get no ctime.
 
 setUmask ($umask)
 Set the umask to create files and directories on unix systems.
 
 getUmask ()
 Get the umask to create files and directories on unix systems.
 
- Public Member Functions inherited from AdapterOptions
 setAdapter (StorageInterface $adapter=null)
 Adapter using this instance.
 
 setKeyPattern ($keyPattern)
 Set key pattern.
 
 getKeyPattern ()
 Get key pattern.
 
 setNamespace ($namespace)
 Set namespace.
 
 getNamespace ()
 Get namespace.
 
 setReadable ($readable)
 Enable/Disable reading data from cache.
 
 getReadable ()
 If reading data from cache enabled.
 
 setTtl ($ttl)
 Set time to live.
 
 getTtl ()
 Get time to live.
 
 setWritable ($writable)
 Enable/Disable writing data to cache.
 
 getWritable ()
 If writing data to cache enabled.
 
 toArray ()
 Cast to array.
 
 setFromArray ($options)
 {}
 
- Public Member Functions inherited from AbstractOptions
 __construct ($options=null)
 Constructor.
 
 setFromArray ($options)
 Set one or more configuration properties.
 
 toArray ()
 Cast to array.
 
 __set ($key, $value)
 Set a configuration property.
 
 __get ($key)
 Get a configuration property.
 
 __isset ($key)
 Test if a configuration property is null.
 
 __unset ($key)
 Set a configuration property to NULL.
 

Protected Attributes

 $cacheDir = null
 
 $clearStatCache = true
 
 $dirLevel = 1
 
 $dirPermission = 0700
 
 $fileLocking = true
 
 $filePermission = 0600
 
 $keyPattern = '/^[a-z0-9_\+\-]*$/Di'
 
 $namespaceSeparator = '-'
 
 $noAtime = true
 
 $noCtime = true
 
 $umask = false
 
- Protected Attributes inherited from AdapterOptions
 $__prioritizedProperties__ = []
 
 $adapter
 
 $keyPattern = ''
 
 $namespace = 'zfcache'
 
 $readable = true
 
 $ttl = 0
 
 $writable = true
 
- Protected Attributes inherited from AbstractOptions
 $__strictMode__ = true
 

Additional Inherited Members

- Protected Member Functions inherited from AdapterOptions
 triggerOptionEvent ($optionName, $optionValue)
 Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.
 
 normalizeTtl (&$ttl)
 Validates and normalize a TTL.
 

Detailed Description

These are options specific to the Filesystem adapter.

Constructor & Destructor Documentation

__construct (   $options = null)

Constructor.

Parameters
array | Traversable | null$options
Returns
FilesystemOptions
Exceptions
Exception\InvalidArgumentException

Member Function Documentation

getCacheDir ( )

Get cache dir.

Returns
null|string
getClearStatCache ( )

Get clear stat cache.

Returns
bool
getDirLevel ( )

Get dir level.

Returns
int
getDirPermission ( )

Get permission to create directories on unix systems.

Returns
false|int
getFileLocking ( )

Get file locking.

Returns
bool
getFilePermission ( )

Get permission to create files on unix systems.

Returns
false|int
getNamespaceSeparator ( )

Get namespace separator.

Returns
string
getNoAtime ( )

Get no atime.

Returns
bool
getNoCtime ( )

Get no ctime.

Returns
bool
getUmask ( )

Get the umask to create files and directories on unix systems.

Returns
false|int
setCacheDir (   $cacheDir)

Set cache dir.

Parameters
string$cacheDir
Returns
FilesystemOptions
Exceptions
Exception\InvalidArgumentException
setClearStatCache (   $clearStatCache)

Set clear stat cache.

Parameters
bool$clearStatCache
Returns
FilesystemOptions
setDirLevel (   $dirLevel)

Set dir level.

Parameters
int$dirLevel
Returns
FilesystemOptions
Exceptions
Exception\InvalidArgumentException
setDirPermission (   $dirPermission)

Set permission to create directories on unix systems.

Parameters
false | string | int$dirPermissionFALSE to disable explicit permission or an octal number
Returns
FilesystemOptions
See Also
setUmask
setFilePermission http://php.net/manual/function.chmod.php
setFileLocking (   $fileLocking)

Set file locking.

Parameters
bool$fileLocking
Returns
FilesystemOptions
setFilePermission (   $filePermission)

Set permission to create files on unix systems.

Parameters
false | string | int$filePermissionFALSE to disable explicit permission or an octal number
Returns
FilesystemOptions
See Also
setUmask
setDirPermission http://php.net/manual/function.chmod.php
setNamespaceSeparator (   $namespaceSeparator)

Set namespace separator.

Parameters
string$namespaceSeparator
Returns
FilesystemOptions
setNoAtime (   $noAtime)

Set no atime.

Parameters
bool$noAtime
Returns
FilesystemOptions
setNoCtime (   $noCtime)

Set no ctime.

Parameters
bool$noCtime
Returns
FilesystemOptions
setUmask (   $umask)

Set the umask to create files and directories on unix systems.

Note: On multithreaded webservers it's better to explicit set file and dir permission.

Parameters
false | string | int$umaskFALSE to disable umask or an octal number
Returns
FilesystemOptions
See Also
setFilePermission
setDirPermission http://en.wikipedia.org/wiki/Umask

Member Data Documentation

$cacheDir = null
protected
$clearStatCache = true
protected
$dirLevel = 1
protected
$dirPermission = 0700
protected
$fileLocking = true
protected
$filePermission = 0600
protected
$keyPattern = '/^[a-z0-9_\+\-]*$/Di'
protected
$namespaceSeparator = '-'
protected
$noAtime = true
protected
$noCtime = true
protected
$umask = false
protected