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

Class: Storage

Source Location: /storage/Storage.class.php

Class Overview

ParameterHolder
   |
   --Storage

Storage allows you to customize the way Mojavi stores its persistent data.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: Storage.class.php 668 2004-12-16 01:16:43Z seank $

Copyright:

Methods


Child classes:

SessionStorage
SessionStorage allows you to store persistent Mojavi data in the user session.

Inherited Variables

Inherited Methods

Class: ParameterHolder

ParameterHolder::clearParameters()
Clear all parameters associated with this request.
ParameterHolder::getParameter()
Retrieve a parameter.
ParameterHolder::getParameterNames()
Retrieve an array of parameter names.
ParameterHolder::getParameters()
Retrieve an array of parameters.
ParameterHolder::hasParameter()
Indicates whether or not a parameter exists.
ParameterHolder::removeParameter()
Remove a parameter.
ParameterHolder::setParameter()
Set a parameter.
ParameterHolder::setParameterByRef()
Set a parameter by reference.
ParameterHolder::setParameters()
Set an array of parameters.
ParameterHolder::setParametersByRef()
Set an array of parameters by reference.

Class Details

[line 23]
Storage allows you to customize the way Mojavi stores its persistent data.



Tags:

abstract:  
version:  $Id: Storage.class.php 668 2004-12-16 01:16:43Z seank $
since:  3.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Methods


method getContext [line 45]

Context getContext( )

Retrieve the current application context.



Tags:

return:  A Context instance.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method initialize [line 69]

bool initialize( Context $context, [array $parameters = null])

Initialize this Storage.



Tags:

return:  true, if initialization completes successfully, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  InitializationException If an error occurs while initializing this Storage.


Overridden in child classes as:

SessionStorage::initialize()
Initialize this Storage.
PostgreSQLSessionStorage::initialize()
Initialize this Storage.
MySQLSessionStorage::initialize()
Initialize this Storage.

Parameters:

Context   $context   A Context instance.
array   $parameters   An associative array of initialization parameters.

[ Top ]

method newInstance [line 98]

Storage newInstance( string $class)

Retrieve a new Storage implementation instance.



Tags:

return:  A Storage implementation instance.
static:  
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  FactoryException If a storage implementation instance cannot be created.


Parameters:

string   $class   A Storage implementation name

[ Top ]

method read [line 137]

mixed &read( string $key)

Read data from this storage.

The preferred format for a key is directory style so naming conflicts can be avoided.




Tags:

return:  Data associated with the key.
abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  StorageException If an error occurs while reading data from this storage.


Overridden in child classes as:

SessionStorage::read()
Read data from this storage.

Parameters:

string   $key   A unique key identifying your data.

[ Top ]

method remove [line 157]

mixed &remove( string $key)

Remove data from this storage.

The preferred format for a key is directory style so naming conflicts can be avoided.




Tags:

return:  Data associated with the key.
abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  StorageException If an error occurs while removing data from this storage.


Overridden in child classes as:

SessionStorage::remove()
Remove data from this storage.

Parameters:

string   $key   A unique key identifying your data.

[ Top ]

method shutdown [line 172]

void shutdown( )

Execute the shutdown procedure.



Tags:

abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  StorageException If an error occurs while shutting down this storage.


Overridden in child classes as:

SessionStorage::shutdown()
Execute the shutdown procedure.
PostgreSQLSessionStorage::shutdown()
Execute the shutdown procedure.
MySQLSessionStorage::shutdown()
Execute the shutdown procedure.

[ Top ]

method write [line 193]

void write( string $key, mixed &$data)

Write data to this storage.

The preferred format for a key is directory style so naming conflicts can be avoided.




Tags:

abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  StorageException If an error occurs while writing to this storage.


Overridden in child classes as:

SessionStorage::write()
Write data to this storage.

Parameters:

string   $key   A unique key identifying your data.
mixed   &$data   Data associated with your key.

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:28 +0900 by phpDocumentor 1.3.0RC5