Login |  Register 
Your Developer Exam showed me just how much there is to PHP.
Ross
 

RocksDBOArray Class

Description

This class enables a database table to be easily manipulated without having to write any SQL.

Moreover, it allows multiple rows operations, which is not possible with class RocksDBO.

  • author: Gaurang Patel
  • version: 0.2.1

Located in /RocksDBOArray.php (line 14)


	
			
Variable Summary
mixed $Results
Method Summary
RocksDBOArray __construct (string $tableName, [string $configFileName = null], [string $fieldDefinition = null], [RocksDBO[] $rowValues = null])
void AddOrderBy (string $fieldName, [string $orderDirection = null])
int Count ()
void Delete ()
void LoadDBOObjects (array $rowValues)
void Save ()
void Select ()
void __call ( $method_name,  $parameters)
void __get ( $name)
void __set ( $name,  $value)
Variables
mixed $Results (line 20)
  • access: public
Methods
Constructor __construct (line 33)

The constructor enables the database object array to be configured.

  • access: public
RocksDBOArray __construct (string $tableName, [string $configFileName = null], [string $fieldDefinition = null], [RocksDBO[] $rowValues = null])
  • string $tableName: the table this database object array should be created for
  • string $configFileName: the configuration filename that should be used for this object, if null the default is used
  • string $fieldDefinition: any pre-created field definitions, this is usually used internally.
  • RocksDBO[] $rowValues: array of RocksDBO objects that should be loaded.
Count (line 261)

This counts the number of items in the DBOArray.

  • access: public
int Count ()
AddOrderBy (line 282)

This determines the order of the array. There can be as many order bys applied as wanted.

  • access: public
void AddOrderBy (string $fieldName, [string $orderDirection = null])
  • string $fieldName: the field name to be ordered
  • string $orderDirection: the direction the field should be ordered. This can either take the values RocksDesc or RocksAsc.
Delete (line 207)

This will delete rows that match the parameters you have set on this object. Moreover, it also clears the $Results array.

  • access: public
void Delete ()
GetFieldDefinition (line 241)

This returns the array of field definitions.

  • access: public
void GetFieldDefinition ()
LoadDBOObjects (line 123)

This loads an array of RocksDBO objects into $Results array.

  • access: public
void LoadDBOObjects (array $rowValues)
  • array $rowValues: is the array of RocksDBO objects.
Save (line 191)

This saves all RocksDBO objects in $Results to the database. Insert/update is executed seperately for each object.

  • access: public
void Save ()
Select (line 137)

This will select all data with the properties that are set. This function can return more than one rows when found.

  • access: public
void Select ()
__call (line 99)
  • access: public
void __call ( $method_name,  $parameters)
  • $method_name
  • $parameters
__get (line 246)
  • access: public
void __get ( $name)
  • $name
__set (line 255)
  • access: public
void __set ( $name,  $value)
  • $name
  • $value

No comments have been provided.
security image

Written by Dominic Skinner
Last Updated: 2011-10-25 16:00:38