MagicSmoke
$VERSION$
|
parent class of all tables More...
Public Member Functions | |
__get ($name) | |
returns the property/column More... | |
__isset ($name) | |
checks whether a column exists More... | |
__set ($name, $value) | |
set properties More... | |
__unset ($name) | |
unsets column-properties to NULL More... | |
deleteFromDb () | |
deletes this instance from the database; returns true if it actually executed More... | |
hasColumn ($c) | |
returns whether the table contains a specific column More... | |
hasProperty ($c) | |
overridden by woc, returns true if the property exists More... | |
insert () | |
insert the object under a new primary key value into the DB (implicitly calls newKey); returns true on success More... | |
insertOrUpdate () | |
updates existing object in the database or inserts it if it does not exist in the DB yet More... | |
isAuditable () | |
returns whether this is an auditable table More... | |
isChanged () | |
returns whether any property has changed since the last DB sync More... | |
isColumnChanged ($c) | |
returns whether a specific column has changed since the last DB sync More... | |
newKey () | |
generate a new primary key value for insert and marks the object as not yet in the DB; the default sets the primary key to NULL if it is a sequence; call the original first if you overwrite it More... | |
revert ($name) | |
reverts changes to the property More... | |
revertAll () | |
reverts all changes to properties More... | |
setFromArray (array $data) | |
set multiple properties More... | |
tableName () | |
returns the name of the table More... | |
update () | |
updates the object in the database; returns true on success; fails if it did not come from the DB - use insertOrUpdate in this case; succeeds without asking the database if nothing has changed More... | |
where () | |
returns the where clause to find this instance (via primary key columns) More... | |
Protected Member Functions | |
__construct (array $data, $isfromdb, $table) | |
constructs a basic table More... | |
createAudit () | |
overridden by woc, if this an auditable table; used in insert and update More... | |
resetAudit () | |
overridden in auditable implementations: resets the audit state More... | |
Protected Attributes | |
$cdata | |
$data | |
parent class of all tables
|
protected |
constructs a basic table
References $d, $data, hasProperty(), and resetAudit().
WobTable::__get | ( | $name | ) |
returns the property/column
References hasProperty().
WobTable::__isset | ( | $name | ) |
checks whether a column exists
References $db.
WobTable::__set | ( | $name, | |
$value | |||
) |
WobTable::__unset | ( | $name | ) |
unsets column-properties to NULL
References hasProperty().
|
protected |
WobTable::deleteFromDb | ( | ) |
deletes this instance from the database; returns true if it actually executed
References $db, isAuditable(), resetAudit(), and where().
WobTable::hasColumn | ( | $c | ) |
returns whether the table contains a specific column
References WobSchemaBase\tableHasColumn().
|
abstract |
overridden by woc, returns true if the property exists
Referenced by __construct(), __get(), __set(), __unset(), revert(), and setFromArray().
WobTable::insert | ( | ) |
insert the object under a new primary key value into the DB (implicitly calls newKey); returns true on success
References $d, $data, $db, createAudit(), WobSchemaBase\hasSequence(), and newKey().
Referenced by insertOrUpdate().
WobTable::insertOrUpdate | ( | ) |
WobTable::isAuditable | ( | ) |
returns whether this is an auditable table
Referenced by deleteFromDb().
WobTable::isChanged | ( | ) |
returns whether any property has changed since the last DB sync
WobTable::isColumnChanged | ( | $c | ) |
returns whether a specific column has changed since the last DB sync
WobTable::newKey | ( | ) |
generate a new primary key value for insert and marks the object as not yet in the DB; the default sets the primary key to NULL if it is a sequence; call the original first if you overwrite it
References WobSchemaBase\hasSequence(), and resetAudit().
Referenced by insert().
|
protected |
overridden in auditable implementations: resets the audit state
Referenced by __construct(), deleteFromDb(), and newKey().
WobTable::revert | ( | $name | ) |
reverts changes to the property
References hasProperty().
WobTable::revertAll | ( | ) |
reverts all changes to properties
WobTable::setFromArray | ( | array | $data | ) |
set multiple properties
References __set(), and hasProperty().
WobTable::tableName | ( | ) |
returns the name of the table
WobTable::update | ( | ) |
updates the object in the database; returns true on success; fails if it did not come from the DB - use insertOrUpdate in this case; succeeds without asking the database if nothing has changed
References $d, $db, createAudit(), and where().
Referenced by insertOrUpdate().
WobTable::where | ( | ) |
returns the where clause to find this instance (via primary key columns)
References $db, and WobSchemaBase\primaryKeyColumns().
Referenced by deleteFromDb(), and update().
|
protected |
|
protected |
Referenced by __construct(), insert(), insertOrUpdate(), WTvoucher\newRow(), WTuserrole\newRow(), WTuserhost\newRow(), WTuser\newRow(), WTticket_audit\newRow(), WTticket\newRow(), WTtemplate\newRow(), WTshipping\newRow(), WTsession\newRow(), WTseatplan\newRow(), WTroom\newRow(), WTroleright\newRow(), WTrole\newRow(), WTproduct\newRow(), WTpricecategory\newRow(), WTpaymenttype\newRow(), WTorderdocuments\newRow(), WTorder_audit\newRow(), WTorder\newRow(), WTitem_audit\newRow(), WTitem\newRow(), WThost\newRow(), WTeventprice\newRow(), WTevent\newRow(), WTdocumentlog\newRow(), WTcustomer\newRow(), WTcouponrule\newRow(), WTcoupon\newRow(), WTcountry\newRow(), WTcontacttype\newRow(), WTcontact\newRow(), WTconfig\newRow(), WTcartvoucher\newRow(), WTcartticket\newRow(), WTcartitem\newRow(), WTcart\newRow(), WTartist\newRow(), WTaddress\newRow(), WTvoucher_audit\newRow(), and WTwebsession\newRow().