Ubiquity  2.5.2
php rapid development framework
ObjectCache Class Reference

This class is responsible for storing Arrays in a PHP classe. More...

+ Inheritance diagram for ObjectCache:

Public Member Functions

 __construct ($root, $postfix="", $cacheParams=[])
 Initializes the file cache-provider. More...
 
 exists ($key)
 Check if annotation-data for the key has been stored. More...
 
 store ($key, $content, $tag=null)
 
 fetch ($key)
 Fetches data stored for the given key. More...
 
 file_get_contents ($key)
 return data stored for the given key. More...
 
 getTimestamp ($key)
 Returns the timestamp of the last cache update for the given key. More...
 
 remove ($key)
 {} More...
 
 clear ($matches="")
 {} More...
 
 getCacheFiles ($type)
 {} More...
 
 clearCache ($type)
 {} More...
 
 getCacheInfo ()
 {} More...
 
 getEntryKey ($key)
 {} More...
 
 setRoot ($root)
 {} More...
 
- Public Member Functions inherited from AbstractDataCache
 __construct ($root, $postfix='')
 
 init ()
 
 exists ($key)
 Check if annotation-data for the key has been stored. More...
 
 expired ($key, $duration)
 
 store ($key, $code, $tag=null)
 Caches the given data with the given key. More...
 
 getRoot ()
 
 setRoot ($_root)
 
 fetch ($key)
 Fetches data stored for the given key. More...
 
 file_get_contents ($key)
 return data stored for the given key. More...
 
 getTimestamp ($key)
 Returns the timestamp of the last cache update for the given key. More...
 
 remove ($key)
 
 clear ()
 Clears all cache entries. More...
 
 getCacheFiles ($type)
 
 clearCache ($type)
 
 getCacheInfo ()
 
 getEntryKey ($key)
 

Protected Member Functions

 getCompleteClassname ($key)
 
 getNamespace ($key)
 
 getClassname ($key)
 

Private Member Functions

 _getPath ($key)
 Maps a cache-key to the absolute path of a PHP file. More...
 

Private Attributes

 $_fileMode
 
 $_cacheDirectory
 

Additional Inherited Members

- Protected Attributes inherited from AbstractDataCache
 $_root
 
 $postfix
 

Detailed Description

This class is responsible for storing Arrays in a PHP classe.

Ubiquity$ObjectCache This class is part of Ubiquity

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.2

Definition at line 18 of file ObjectCache.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $root,
  $postfix = "",
  $cacheParams = [] 
)

Initializes the file cache-provider.

Parameters
string$rootabsolute path to the root-folder where cache-files will be stored
string$postfixTermination of file names
array$cacheParamsdefaults to ["fileMode"=>"0755"]

Definition at line 38 of file ObjectCache.php.

Member Function Documentation

◆ _getPath()

_getPath (   $key)
private

Maps a cache-key to the absolute path of a PHP file.

Parameters
string$keycache key
Returns
string absolute path of the PHP file

Definition at line 148 of file ObjectCache.php.

◆ clear()

clear (   $matches = "")

{}

See also
::clear()

Definition at line 170 of file ObjectCache.php.

◆ clearCache()

clearCache (   $type)

{}

See also
::clearCache()

Definition at line 196 of file ObjectCache.php.

◆ exists()

exists (   $key)

Check if annotation-data for the key has been stored.

Parameters
string$keycache key
Returns
boolean true if data with the given key has been stored; otherwise false

Definition at line 54 of file ObjectCache.php.

◆ fetch()

fetch (   $key)

Fetches data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Definition at line 114 of file ObjectCache.php.

◆ file_get_contents()

file_get_contents (   $key)

return data stored for the given key.

Parameters
string$keycache key
Returns
mixed the cached data

Definition at line 126 of file ObjectCache.php.

◆ getCacheFiles()

getCacheFiles (   $type)

{}

See also
::getCacheFiles()

Definition at line 183 of file ObjectCache.php.

◆ getCacheInfo()

getCacheInfo ( )

{}

See also
::getCacheInfo()

Definition at line 205 of file ObjectCache.php.

◆ getClassname()

getClassname (   $key)
protected

Definition at line 96 of file ObjectCache.php.

◆ getCompleteClassname()

getCompleteClassname (   $key)
protected

Definition at line 74 of file ObjectCache.php.

◆ getEntryKey()

getEntryKey (   $key)

{}

See also
::getEntryKey()

Definition at line 216 of file ObjectCache.php.

◆ getNamespace()

getNamespace (   $key)
protected

Definition at line 85 of file ObjectCache.php.

◆ getTimestamp()

getTimestamp (   $key)

Returns the timestamp of the last cache update for the given key.

Parameters
string$keycache key
Returns
int unix timestamp

Definition at line 137 of file ObjectCache.php.

◆ remove()

remove (   $key)

{}

See also
::remove()

Definition at line 158 of file ObjectCache.php.

◆ setRoot()

setRoot (   $root)

{}

See also
::setRoot()

Definition at line 225 of file ObjectCache.php.

◆ store()

store (   $key,
  $content,
  $tag = null 
)

Definition at line 58 of file ObjectCache.php.

Field Documentation

◆ $_cacheDirectory

$_cacheDirectory
private

Definition at line 26 of file ObjectCache.php.

◆ $_fileMode

$_fileMode
private

Definition at line 24 of file ObjectCache.php.


The documentation for this class was generated from the following file: