Properties

$root_pk

$root_pk : integer

root_pk

Type

integer

$initialized

$initialized : boolean

initialized

Type

boolean

$tables

$tables : array

was the object instantiated with valid parmaters? if not call the

Type

array

$modifiedColumns

$modifiedColumns : array

tracks the changes internal to the object, used in the save() method

Type

array

$queries

$queries : array

collects a list of queries used in the save() method

Type

array

Methods

__construct()

__construct(  $config = null) : null

Constructor array config consists of string DSN string table string pk_field int pk

Parameters

$config

Returns

null

initialize()

initialize(  $DSN,   $tableName,   $foundation = false) : NULL

DESCRIPTOR: construct from table definition (information_schema) initialize AND set table values

Parameters

$DSN
$tableName
$foundation

Returns

NULL

initializeBySearch()

initializeBySearch(  $args) : NULL

DESCRIPTOR: construct from table definition (information_schema)

Parameters

$args

Returns

NULL

initializeChildRecord()

initializeChildRecord(  $DSN,   $tableName,   $pk_field,   $fk_field) : NULL

DESCRIPTOR: construct from table definition

Parameters

$DSN
$tableName
$pk_field
$fk_field

Returns

NULL

initializeJoinRecord()

initializeJoinRecord(  $DSN,   $tableName,   $args = null) : NULL

DESCRIPTOR: construct from table definition

Parameters

$DSN
$tableName
$args

Returns

NULL —

SCHEMA

initializeCollectionRecord()

initializeCollectionRecord(  $DSN,   $tableName,   $pk_field,   $fk_field) : NULL

DESCRIPTOR: construct from table definition

Parameters

$DSN
$tableName
$pk_field
$fk_field

Returns

NULL —

SCHEMA

initializeSchema()

initializeSchema(  $DSN,   $tableName) : mixed

DESCRIPTOR: construct from table definition

Parameters

$DSN
$tableName

Returns

mixed —

SCHEMA

initializeFromSchema()

initializeFromSchema(  $DSN,   $tableName,   $set_fk = true) : array

DESCRIPTOR: construct from table definition initialize DO NOT set table values

Parameters

$DSN
$tableName
$set_fk

Returns

array

joinRecord()

joinRecord(  $DSN,   $tableName,   $pk_field,   $fk_field,   $fk) : NULL

DESCRIPTOR: joins a single record from another DB or Table

Parameters

$DSN
$tableName
$pk_field
$fk_field
$fk

Returns

NULL

joinCollection()

joinCollection(  $args = null) : NULL

DESCRIPTOR: joins a single record from another DB or Table

Parameters

$args

Returns

NULL

joinChildCollection()

joinChildCollection(  $DSN,   $joinTable,   $pk_field,   $fk_field,   $fk) : NULL

DESCRIPTOR: joins a single record from another DB or Table

Parameters

$DSN
$joinTable
$pk_field
$fk_field
$fk

Returns

NULL

__call()

__call(  $method,   $args) : mixed

DESCRIPTOR: Dynamic GETTER SETTER SIGNATURE userObj->get(table, field); entity table userObj->get(table, field, pk); collection table

userObj->set(table, field, value); base table userObj->set(table, field, value, pk); entity table

Parameters

$method
$args

Returns

mixed

save()

save(  $table = null) : array

DESCRIPTOR: STORES CHANGES TO THE DAO TO THE DB(s)

Parameters

$table

Returns

array

stripTrailingComma()

stripTrailingComma(  $stringValue) : string

DESCRIPTOR: strips column from the end of a string if you're creating values like this:: query .= key2.' = "'.value2.'",';

Parameters

$stringValue

Returns

string —

stringValue

DUMP()

DUMP() : NULL

DESCRIPTOR: PUKE SELF

Returns

NULL

getMYSQLConstants()

getMYSQLConstants(  $DSN = null) : array

DESCRIPTOR: set_connection

Parameters

$DSN

Returns

array

__destruct()

__destruct() : NULL

DESCRIPTOR: Saves the changes to the DB IF $commit=true (default)

Returns

NULL

generateQueries()

generateQueries(string  $key, string  $value, string  $table) : NULL

DESCRIPTOR: checks the "modifiedColumns" array and generates update statements based on the values of that array if the table is not set [NULL] do everything, if it is do only that table

Parameters

string $key
string $value
string $table

Returns

NULL

generateInsertQuery()

generateInsertQuery(  $table,   $value) : string

DESCRIPTOR: checks the "modifiedColumns" array and generates update statements based on the values of that array if the table is not set [NULL] do everything, if it is do only that table set some flags to dynamically modify the insert query to use INSERT IGNORE ON DUPLICATE KEY UPDATE http://dev.mysql.com/doc/refman/5.5/en/insert.html

Parameters

$table
$value

Returns

string