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

Public Member Functions

 __construct ($options=null)
 Constructor.
 
 setCacheByDefault ($cacheByDefault)
 Set flag indicating whether or not to cache by default.
 
 getCacheByDefault ()
 Do we cache by default?
 
 setCacheOutput ($cacheOutput)
 Set whether or not to cache output.
 
 getCacheOutput ()
 Will we cache output?
 
 setClass ($class)
 Set class name.
 
 getClass ()
 Get class name.
 
 setClassCacheMethods (array $classCacheMethods)
 Set list of method return values to cache.
 
 getClassCacheMethods ()
 Get list of methods from which to cache return values.
 
 setClassNonCacheMethods (array $classNonCacheMethods)
 Set list of method return values NOT to cache.
 
 getClassNonCacheMethods ()
 Get list of methods from which NOT to cache return values.
 
 setDirPermission ($dirPermission)
 Set directory permission.
 
 getDirPermission ()
 Gets directory permission.
 
 setUmask ($umask)
 Set umask.
 
 getUmask ()
 Get umask.
 
 setFileLocking ($fileLocking)
 Set whether or not file locking should be used.
 
 getFileLocking ()
 Is file locking enabled?
 
 setFilePermission ($filePermission)
 Set file permission.
 
 getFilePermission ()
 Gets file permission.
 
 setIndexFilename ($indexFilename)
 Set value for index filename.
 
 getIndexFilename ()
 Get value for index filename.
 
 setObject ($object)
 Set object to cache.
 
 getObject ()
 Get object to cache.
 
 setObjectCacheMagicProperties ($objectCacheMagicProperties)
 Set flag indicating whether or not to cache magic properties.
 
 getObjectCacheMagicProperties ()
 Should we cache magic properties?
 
 setObjectCacheMethods (array $objectCacheMethods)
 Set list of object methods for which to cache return values.
 
 getObjectCacheMethods ()
 Get list of object methods for which to cache return values.
 
 setObjectKey ($objectKey)
 Set the object key part.
 
 getObjectKey ()
 Get object key.
 
 setObjectNonCacheMethods (array $objectNonCacheMethods)
 Set list of object methods for which NOT to cache return values.
 
 getObjectNonCacheMethods ()
 Get list of object methods for which NOT to cache return values.
 
 setPublicDir ($publicDir)
 Set location of public directory.
 
 getPublicDir ()
 Get location of public directory.
 
 setStorage ($storage)
 Set storage adapter.
 
 getStorage ()
 Get storage adapter.
 
- 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 Member Functions

 recursiveStrtolower (array $array)
 Recursively apply strtolower on all values of an array, and return as a list of unique values.
 
 normalizeObjectMethods (array $methods)
 Normalize object methods.
 
 storageFactory ($storage)
 Create a storage object from a given specification.
 

Protected Attributes

 $cacheByDefault = true
 
 $cacheOutput = true
 
 $class
 
 $classCacheMethods = []
 
 $classNonCacheMethods = []
 
 $umask = false
 
 $dirPermission = 0700
 
 $filePermission = 0600
 
 $fileLocking = true
 
 $indexFilename = 'index.html'
 
 $object
 
 $objectCacheMagicProperties = false
 
 $objectCacheMethods = []
 
 $objectKey
 
 $objectNonCacheMethods = ['__tostring']
 
 $publicDir
 
 $storage
 
- Protected Attributes inherited from AbstractOptions
 $__strictMode__ = true
 

Constructor & Destructor Documentation

__construct (   $options = null)

Constructor.

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

Member Function Documentation

getCacheByDefault ( )

Do we cache by default?

Used by:

Returns
bool
getCacheOutput ( )

Will we cache output?

Used by:

Returns
bool
getClass ( )

Get class name.

Used by:

Returns
null|string
getClassCacheMethods ( )

Get list of methods from which to cache return values.

Used by:

Returns
array
getClassNonCacheMethods ( )

Get list of methods from which NOT to cache return values.

Used by:

Returns
array
getDirPermission ( )

Gets directory permission.

Returns
false|int
getFileLocking ( )

Is file locking enabled?

Used by:

Returns
bool
getFilePermission ( )

Gets file permission.

Returns
false|int
getIndexFilename ( )

Get value for index filename.

Returns
string
getObject ( )

Get object to cache.

Returns
null|object
getObjectCacheMagicProperties ( )

Should we cache magic properties?

Used by:

Returns
bool
getObjectCacheMethods ( )

Get list of object methods for which to cache return values.

Returns
array
getObjectKey ( )

Get object key.

Used by:

Returns
string
getObjectNonCacheMethods ( )

Get list of object methods for which NOT to cache return values.

Returns
array
getPublicDir ( )

Get location of public directory.

Used by:

Returns
null|string
getStorage ( )

Get storage adapter.

Used by:

Returns
null|Storage
getUmask ( )

Get umask.

Used by:

Returns
false|int
normalizeObjectMethods ( array  $methods)
protected

Normalize object methods.

Recursively casts values to lowercase, then determines if any are in a list of methods not handled, raising an exception if so.

Parameters
array$methods
Returns
array
Exceptions
Exception\InvalidArgumentException
recursiveStrtolower ( array  $array)
protected

Recursively apply strtolower on all values of an array, and return as a list of unique values.

Parameters
array$array
Returns
array
setCacheByDefault (   $cacheByDefault)

Set flag indicating whether or not to cache by default.

Used by:

Parameters
bool$cacheByDefault
Returns
PatternOptions
setCacheOutput (   $cacheOutput)

Set whether or not to cache output.

Used by:

Parameters
bool$cacheOutput
Returns
PatternOptions
setClass (   $class)

Set class name.

Used by:

Parameters
string$class
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
setClassCacheMethods ( array  $classCacheMethods)

Set list of method return values to cache.

Used by:

Parameters
array$classCacheMethods
Returns
PatternOptions
setClassNonCacheMethods ( array  $classNonCacheMethods)

Set list of method return values NOT to cache.

Used by:

Parameters
array$classNonCacheMethods
Returns
PatternOptions
setDirPermission (   $dirPermission)

Set directory permission.

Parameters
false | int$dirPermission
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
setFileLocking (   $fileLocking)

Set whether or not file locking should be used.

Used by:

Parameters
bool$fileLocking
Returns
PatternOptions
setFilePermission (   $filePermission)

Set file permission.

Parameters
false | int$filePermission
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
setIndexFilename (   $indexFilename)

Set value for index filename.

Parameters
string$indexFilename
Returns
PatternOptions
setObject (   $object)

Set object to cache.

Parameters
mixed$object
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
setObjectCacheMagicProperties (   $objectCacheMagicProperties)

Set flag indicating whether or not to cache magic properties.

Used by:

Parameters
bool$objectCacheMagicProperties
Returns
PatternOptions
setObjectCacheMethods ( array  $objectCacheMethods)

Set list of object methods for which to cache return values.

Parameters
array$objectCacheMethods
Returns
PatternOptions
Exceptions
Exception\InvalidArgumentException
setObjectKey (   $objectKey)

Set the object key part.

Used to generate a callback key in order to speed up key generation.

Used by:

Parameters
null | string$objectKeyThe object key or NULL to use the objects class name
Returns
PatternOptions
setObjectNonCacheMethods ( array  $objectNonCacheMethods)

Set list of object methods for which NOT to cache return values.

Parameters
array$objectNonCacheMethods
Returns
PatternOptions
Exceptions
Exception\InvalidArgumentException
setPublicDir (   $publicDir)

Set location of public directory.

Used by:

Parameters
string$publicDir
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
setStorage (   $storage)

Set storage adapter.

Required for the following Pattern classes:

Parameters
string | array | Storage$storage
Returns
PatternOptions
setUmask (   $umask)

Set umask.

Used by:

Parameters
false | int$umask
Exceptions
Exception\InvalidArgumentException
Returns
PatternOptions
storageFactory (   $storage)
protected

Create a storage object from a given specification.

Parameters
array | string | Storage$storage
Exceptions
Exception\InvalidArgumentException
Returns
Storage

Member Data Documentation

$cacheByDefault = true
protected
$cacheOutput = true
protected
$class
protected
$classCacheMethods = []
protected
$classNonCacheMethods = []
protected
$dirPermission = 0700
protected
$fileLocking = true
protected
$filePermission = 0600
protected
$indexFilename = 'index.html'
protected
$object
protected
$objectCacheMagicProperties = false
protected
$objectCacheMethods = []
protected
$objectKey
protected
$objectNonCacheMethods = ['__tostring']
protected
$publicDir
protected
$storage
protected
$umask = false
protected