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

$VIEW

$VIEW : array

default view definition

Type

array

$queries

$queries : array

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

Type

array

Methods

__construct()

__construct(  $args = null) : null

DESCRIPTOR: first we check the definition has been set if there's no definition we can't use this type of object

Parameters

$args

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) : \JCORE\SERVICE\DAO\ORM\outputErrors

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

Parameters

$table

Returns

\JCORE\SERVICE\DAO\ORM\outputErrors

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

init()

init(  $args) : null

DESCRIPTOR:

Parameters

$args

Returns

null

parseJSONColumns()

parseJSONColumns(  $result = null) : \JCORE\SERVICE\DAO\ORM\return

DESCRIPTOR:

Parameters

$result

Returns

\JCORE\SERVICE\DAO\ORM\return

getJSONColumnValue()

getJSONColumnValue(  $args = null) : string

DESCRIPTOR: 'result' => result, 'ACL_TREE' = ACL_TREE,

Parameters

$args

Returns

string

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