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

Class: DataSpace

Source Location: /framework/util/dataspace.inc.php

http://wact.sourceforge.net/index.php/DataSpace

Class Overview


The DataSpace is a container for a set of named data values (properties).

Variables

Methods


Child classes:

ResponseModel
AdodbRecord
Encapsulates operations on a database via ADOdb.
MDBRecord
Encapsulates operations on a database via PEAR::DB.
MDB2Record
Encapsulates operations on a database via PEAR::MDB2.
MySqlRecord
Encapsulates INSERT, UPDATE, or DELETE operations on a MySQL database.
PearRecord
Encapsulates operations on a database via PEAR::DB.
DataComponent
The DataSpace is a container for a set of named data values (properties).

Inherited Variables

Inherited Methods


Class Details

The DataSpace is a container for a set of named data values (properties).
abstract:  
access:  public
see:  http://wact.sourceforge.net/index.php/DataSpace

Class Variables


$filter =

Filter object for transforming stored data
access:  private
Type:   object

$properties = array()

Properties stored in the DataSpace are contained here
access:  private
Type:   array

Class Methods


method export

Returns a reference to the complete array of properties stored

array &export( )

API Tags:

access:  public

method get

Gets a copy of a stored property by name

mixed get( string $name)

API Tags:

return:  value of property or NULL if not found
access:  public

Overridden in child classes as:

DataComponent::get()
Gets a copy of a stored property by name

Parameters:

string   $name   name of property

method getPath

Gets a property value by navagating a dot separated path that dereferences elements within the dataspace.

If an element cannot be dereferenced or is not set, the value NULL is returned.



mixed getPath( string $path)

API Tags:

return:  value of property or NULL if not found
access:  public

Parameters:

string   $path   name of property

method getPropertyList

Return a unique list of available properties This method is probably going to have capitalization problems.

array getPropertyList( )

API Tags:

access:  public

Overridden in child classes as:

DataComponent::getPropertyList()
Return a unique list of available properties This method is probably going to have capitalization problems.


method hasProperty

Has a value been assigned under this name for this dataspace?

boolean hasProperty( string $name)

API Tags:

return:  TRUE if property exists
access:  public

Overridden in child classes as:

DataComponent::hasProperty()
Has a value been assigned under this name for this dataspace?

Parameters:

string   $name   name of property

method import

replaces the current properties of this dataspace with the proprties and values passed as a parameter

void import( array $property_list)

API Tags:

access:  public

Overridden in child classes as:

DataComponent::import()
replaces the current properties of this dataspace with the proprties and values passed as a parameter

Parameters:

array   $property_list  

method isDataSource

Any class that implements the DataSource interface should implement this method This is a PHP4 way of detecting which objects implement the interface.

Boolean isDataSource( )

API Tags:

return:  always TRUE
access:  public

method makeDataSpace

Static method to convert a variable into a dataspace.

void &makeDataSpace( mixed &$var)

method merge

Append a new list of values to the DataSpace.

Existing key values will be overwritten if duplicated in the new value list.



void merge( array $property_list)

API Tags:

access:  public

Parameters:

array   $property_list   a list of property names and the values to set them to

method prepare

Prepares the dataspace, executing the doFilter() method of the registered filter, if one exists

void prepare( )

API Tags:

deprecated:  
access:  protected

method registerFilter

Registers a filter with the dataspace.

Filters are used to transform stored properties.



void registerFilter( object &$filter)

API Tags:

deprecated:  
access:  public

Parameters:

object   &$filter   instance of filter class containing a doFilter() method

method remove

removes stored property value

void remove( string $name)

API Tags:

access:  public

Parameters:

string   $name   name of property

method removeAll

removes all property values

void removeAll( )

API Tags:

access:  public

method set

Stores a copy of value into a Property

void set( string $name, mixed $value)

API Tags:

access:  public

Overridden in child classes as:

DataComponent::set()
Stores a copy of value into a Property

Parameters:

string   $name   name of property
mixed   $value   value of property

method setPath

Stores a copy of value into a Property based on a dot separated path.

If an element cannot be dereferenced, or is not set, it is converted to an array.



void setPath( string $path, mixed $value)

API Tags:

access:  public

Parameters:

string   $path   name of property
mixed   $value   value of property
WACT: Copyright 2003 Procata, Inc. Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
Documentation generated on Sun, 28 Nov 2004 19:45:14 -0800 by phpDocumentor 1.2.3