WURFL_Storage
[ class tree: WURFL_Storage ] [ index: WURFL_Storage ] [ all elements ]

Class: WURFL_Storage_Base

Source Location: /Storage/Base.php

Class Overview


Base Storage Provider


Author(s):

  • Fantayeneh Asres Gizaw

Version:

  • $id$

Copyright:

  • ScientiaMobile, Inc.

Implements interfaces:

Variables

Constants

Methods


Child classes:

WURFL_Storage_Apc
APC Storage class
WURFL_Storage_File
WURFL Storage
WURFL_Storage_Memcache
WURFL Storage
WURFL_Storage_Memory
WURFL Storage
WURFL_Storage_Mysql
WURFL Storage
WURFL_Storage_Null
WURFL Storage

Class Details

[line 31]
Base Storage Provider

A Skeleton implementation of the Storage Interface




Tags:

author:  Fantayeneh Asres Gizaw
version:  $id$
copyright:  ScientiaMobile, Inc.
abstract:  
license:  GNU


[ Top ]


Class Variables

$is_volatile =  false

[line 41]



Tags:

access:  protected

Type:   mixed


[ Top ]

$supports_secondary_caching =  false

[line 42]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 48]

WURFL_Storage_Base __construct( [array $params = array()])

Creates a new WURFL_Storage_Base



Tags:

access:  public


Overridden in child classes as:

WURFL_Storage_Apc::__construct()
WURFL_Storage_File::__construct()
WURFL_Storage_Memcache::__construct()
WURFL_Storage_Memory::__construct()
WURFL_Storage_Mysql::__construct()

Parameters:

array   $params  

[ Top ]

method cacheClear [line 138]

void cacheClear( )



Tags:

access:  protected


[ Top ]

method cacheLoad [line 128]

void cacheLoad( $objectId)



Tags:

access:  protected


Parameters:

   $objectId  

[ Top ]

method cacheRemove [line 133]

void cacheRemove( $objectId)



Tags:

access:  protected


Parameters:

   $objectId  

[ Top ]

method cacheSave [line 123]

void cacheSave( $objectId, $object)



Tags:

access:  protected


Parameters:

   $objectId  
   $object  

[ Top ]

method clear [line 76]

void clear( )

Removes all entries from the Persistence Provider



Tags:

access:  public


Overridden in child classes as:

WURFL_Storage_Apc::clear()
Removes all entry from the Persistence Provider
WURFL_Storage_File::clear()
WURFL_Storage_Memcache::clear()
WURFL_Storage_Memory::clear()
Removes all entry from the Persistence Provier
WURFL_Storage_Mysql::clear()
WURFL_Storage_Null::clear()

[ Top ]

method decode [line 177]

string decode( string $namespace, string $input)

Decode the Object Id



Tags:

return:  value
access:  protected


Parameters:

string   $namespace  
string   $input  

[ Top ]

method encode [line 167]

string encode( string $namespace, string $input)

Encode the Object Id using the Persistence Identifier



Tags:

return:  with the given $namespace as a prefix
access:  protected


Parameters:

string   $namespace  
string   $input  

[ Top ]

method isVolatile [line 83]

boolean isVolatile( )

Returns true if the cache is an in-memory volatile cache, like Memcache or APC, or false if

it is a persistent cache like Filesystem or MySQL




Tags:

access:  public


[ Top ]

method isWURFLLoaded [line 147]

bool isWURFLLoaded( )

Checks if WURFL is Loaded



Tags:

access:  public


[ Top ]

method load [line 63]

mixed load( string $objectId)

Returns the object identified by $objectId



Tags:

return:  value
access:  public


Overridden in child classes as:

WURFL_Storage_Apc::load()
WURFL_Storage_File::load()
WURFL_Storage_Memcache::load()
WURFL_Storage_Memory::load()
WURFL_Storage_Mysql::load()
WURFL_Storage_Null::load()

Parameters:

string   $objectId  

[ Top ]

method remove [line 70]

void remove( string $objectId)

Removes the object identified by $objectId from the persistence provider



Tags:

access:  public


Overridden in child classes as:

WURFL_Storage_Apc::remove()
WURFL_Storage_Memory::remove()

Parameters:

string   $objectId  

[ Top ]

method save [line 56]

void save( string $objectId, mixed $object, [integer $expiration = null])

Saves the object



Tags:

access:  public


Overridden in child classes as:

WURFL_Storage_Apc::save()
WURFL_Storage_File::save()
WURFL_Storage_Memcache::save()
WURFL_Storage_Memory::save()
WURFL_Storage_Mysql::save()
WURFL_Storage_Null::save()

Parameters:

string   $objectId  
mixed   $object  
integer   $expiration   If supported by the provider, this is used to specify the expiration

[ Top ]

method setCacheStorage [line 116]

void setCacheStorage( WURFL_Storage_Base $cache)

Sets the cache provider for the persistence provider; this is used to cache data in a volatile storage system like APC in front of a slow persistence provider like the filesystem.



Tags:

access:  public


Parameters:

WURFL_Storage_Base   $cache  

[ Top ]

method setWURFLLoaded [line 155]

void setWURFLLoaded( [bool $loaded = true])

Sets the WURFL Loaded flag



Tags:

access:  public


Parameters:

bool   $loaded  

[ Top ]

method supportsSecondaryCaching [line 92]

boolean supportsSecondaryCaching( )

This storage provider supports a caching layer in front of it, for example, the File provider supports a volatile cache like Memcache in front of it, whereas APC does not.



Tags:

access:  public


[ Top ]

method validSecondaryCache [line 101]

boolean validSecondaryCache( WURFL_Storage_Base $cache)

This storage provider can be used as a secondary cache



Tags:

access:  public


Parameters:

WURFL_Storage_Base   $cache  

[ Top ]


Class Constants

APPLICATION_PREFIX =  "WURFL_"

[line 33]


[ Top ]

WURFL_LOADED =  "WURFL_WURFL_LOADED"

[line 34]


[ Top ]



Documentation generated on Thu, 03 Oct 2013 19:11:48 +0000 by phpDocumentor 1.4.4