xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • apc
  • file
  • null
  • storage

Class storage

Caches data using Core Storage.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Cache
Extended by Core\Cache\Driver\storage
Namespace: Core\Cache\Driver
Package: Core\Cache
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at Cache/Driver/storage.inc.php

Methods summary

public
# __construct( Core\URI $uri )

Parameters

$uri
Driver configuration URI.

Since

3.1

Overrides

Core\Cache::__construct
public integer|boolean
# chain( Core\Chainable $object, array $flags = Core\Cache\Driver\null )

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Sets the cache storage instance.

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Sets the cache storage instance.

Parameters

$object
Object to chain to instance.
$flags

Optional array of additional chain flags. Usage depends on the actual chain implementation.

Returns

integer|boolean
Returns a non-zero value on success, otherwise false.

Throws

Core\Exception\InvalidArgument
Class of provided object is not supported.

Since

3.1

Overrides

Core\Object::chain
public boolean
# exists( string $class, string $key )

Tests, whether a cache entry for a class item exists.

Tests, whether a cache entry for a class item exists.

Parameters

$class
Cache class of item to test for.
$key
The item key to test for.

Returns

boolean

true, if a cache entry for the requested item exists, otherwise false.

Since

3.1
public string
# get( string $class, string $key )

Reads a cache entry and returns all binary data for the entry.

Reads a cache entry and returns all binary data for the entry.

Parameters

$class
Class of cache item.
$key
The key of the cache item.

Returns

string
Binary data string of cache entry.

Since

3.1

Overrides

Core\Cache::get
public string
# getHash( string $class, string $key )

Returns the hash for the requested cache entry. The hash type depends on the backend in use and defaults to 16-byte binary MD5.

Returns the hash for the requested cache entry. The hash type depends on the backend in use and defaults to 16-byte binary MD5.

Parameters

$class
Class of cache item.
$key
The key of the cache item.

Returns

string
Binary hash of cache element.

Since

3.1

Overrides

Core\Cache::getHash
public Core\Stream
# getStream( string $class, string $key )

Returns a reading stream instance for the requested cache entry.

Returns a reading stream instance for the requested cache entry.

Parameters

$class
Class of cache item.
$key
The key of the cache item.

Returns

Core\Stream
Reading Stream instance for the requested cache entry.

Since

3.1
public integer
# getTimestamp( string $class, string $key )

Returns a UNIX timestamp of the last cache entry modification.

Returns a UNIX timestamp of the last cache entry modification.

Parameters

$class
Class of cache item.
$key
The key of the cache item.

Returns

integer
UNIX timestamp of last modification to the named cache entry.

Since

3.1
public
# put( string $class, string $key, string $binaryData, integer $ttl = Core\Cache\Driver\null )

Writes binary data to a specified cache entry.

Writes binary data to a specified cache entry.

Parameters

$class
Class of cache item.
$key
The key of the cache item.
$binaryData
Binary data string to write to the cache entry.
$ttl

Time to live for cache entry (in seconds). Set to null if entry does not timeout.

Since

3.1

Overrides

Core\Cache::put
public Core\Stream
# putStream( string $class, string $key, integer $ttl = Core\Cache\Driver\null )

Returns a writing stream instance for the requested cache entry.

Returns a writing stream instance for the requested cache entry.

Parameters

$class
Class of cache item.
$key
The key of the cache item.
$ttl

Time to live for cache entry (in seconds). Set to null if entry does not timeout.

Returns

Core\Stream
Writing Stream instance for the requested cache entry.

Since

3.1
public
# remove( string $class, string $key )

Deletes a cache key entry. If the entry does not exist, no operation is performed.

Deletes a cache key entry. If the entry does not exist, no operation is performed.

Parameters

$class
Class of cache item.
$key
The key of the cache item.

Since

3.1

Methods inherited from Core\Cache

activate(), active(), autocreate(), defaultInstance(), getAge(), getMeta(), getVar(), putVar(), setVersionID(), unify()

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

string AutochainParameter

List of automatically chained registry keys.

List of automatically chained registry keys.

Since

3.1
# 'autochain'
string ClassNameParameter

Name of storage class field (primary key pt. 1).

Name of storage class field (primary key pt. 1).

Since

3.1
# 'class-name'
string HashNameParameter

Name of hash field.

Name of hash field.

Since

3.1
# 'hash-name'
string KeyNameParameter

Name of key field (primary key pt. 2).

Name of key field (primary key pt. 2).

Since

3.1
# 'key-name'
string ReferenceParameter

Name of storage reference (e.g. database table).

Name of storage reference (e.g. database table).

Since

3.1
# 'reference'
string TimestampNameParameter

Name of timestamp field.

Name of timestamp field.

Since

3.1
# 'timestamp-name'
string TTLNameParameter

Name of TTL field.

Name of TTL field.

Since

3.1
# 'ttl-name'
string ValueNameParameter

Name of data field (BLOB).

Name of data field (BLOB).

Since

3.1
# 'value-name'
string VersionNameParameter

Name of version field (INTEGER).

Name of version field (INTEGER).

Since

3.1
# 'version-name'

Constants inherited from Core\Cache

SharedClass

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected Core\Storage $_v_driver

Reference to chained storage driver instance.

Reference to chained storage driver instance.

Since

3.0
#
protected array $_v_parameters

Storage cache settings array.

Storage cache settings array.

Since

3.1
#
protected string $_v_reference

Storage cache reference name.

Storage cache reference name.

Since

3.1
#

Properties inherited from Core\Cache

$_activeInstance, $_v_versionID

Magic properties

public read-only Core\Storage $driver

Chained storage driver.

public read-only array $parameters

Configuration paramters array.

public read-only string $reference

Assigned storage reference name.

Magic properties inherited from Core\Cache

$versionID

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen