Login |  Register 
Get your website developed the easy way
Your open source Rocks PHP Library has really made developing PHP easier!
Alan
 

RocksDBO Class

Description

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

  • method: RocksRelation AddRelation(): AddRelation(string $foriegnKey, string $otherTable, string $otherTableForiegnKey, string $relationName = null, string $relationType = null) adds a relation object to the RocksDBO
  • author: Dominic Skinner
  • version: 0.2.1

Located in /RocksDBO.php (line 16)


	
			
Method Summary
RocksDBO __construct (string $tableName, [string $configFileName = null], [string $fieldDefinition = null], [string $rowValues = null])
void Delete ()
void LoadAssociativeArrayData (array $rowValues)
void Save ()
void Select ()
void __call ( $method_name,  $parameters)
void __get ( $name)
void __set ( $name,  $value)
Methods
Constructor __construct (line 34)

The constructor enables the database object to be configured.

  • access: public
RocksDBO __construct (string $tableName, [string $configFileName = null], [string $fieldDefinition = null], [string $rowValues = null])
  • string $tableName: the table this database object 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.
  • string $rowValues: the values of the table row that should be loaded, this is usually used internally.
Delete (line 291)

This will delete rows that match the parameters you have set on this object.

  • access: public
void Delete ()
DeleteCurrentCache (line 169)

Allows the current cached version of the field definitions to be deleted, usually only used internally.

  • access: public
void DeleteCurrentCache ()
GetFieldDefinition (line 381)

This returns the array of field definitions.

  • access: public
void GetFieldDefinition ()
LoadAssociativeArrayData (line 153)

This loads a associative array of data into the fields.

  • access: public
void LoadAssociativeArrayData (array $rowValues)
  • array $rowValues: the associative array to load
Save (line 276)

This saves any changes to the DBO, if you have already got a value for the key it will perform a update otherwise a insert will be performed.

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

This will select all data with the properties that are set, if more than one row is returned a error is thrown.

  • access: public
void Select ()
__call (line 129)
  • access: public
void __call ( $method_name,  $parameters)
  • $method_name
  • $parameters
__get (line 437)
  • access: public
void __get ( $name)
  • $name
__set (line 446)
  • access: public
void __set ( $name,  $value)
  • $name
  • $value

No comments have been provided.
security image

Written by Dominic Skinner
Last Updated: 2009-09-23 06:15:49