Public Member Functions | Protected Member Functions | Protected Attributes

WobTable Class Reference

List of all members.

Public Member Functions

 __set ($name, $value)
 setFromArray (array $data)
 revert ($name)
 revertAll ()
 tableName ()
 hasColumn ($c)
 hasProperty ($c)
 isAuditable ()
 where ()
 __get ($name)
 __isset ($name)
 __unset ($name)
 isChanged ()
 isColumnChanged ($c)
 insert ()
 newKey ()
 update ()
 insertOrUpdate ()
 deleteFromDb ()

Protected Member Functions

 __construct (array $data, $isfromdb, $table)
 createAudit ()
 resetAudit ()
 overridden in auditable implementations: resets the audit state

Protected Attributes

 $data
 $cdata

Detailed Description

parent class of all tables


Constructor & Destructor Documentation

WobTable::__construct ( array $  data,
isfromdb,
table 
) [protected]

constructs a basic table


Member Function Documentation

WobTable::__get ( name  ) 

returns the property/column

WobTable::__isset ( name  ) 

checks whether a column exists

WobTable::__set ( name,
value 
)

set properties

WobTable::__unset ( name  ) 

unsets column-properties to NULL

WobTable::createAudit (  )  [protected]

overridden by woc, if this an auditable table; used in insert and update

WobTable::deleteFromDb (  ) 

deletes this instance from the database; returns true if it actually executed

WobTable::hasColumn ( c  ) 

returns whether the table contains a specific column

WobTable::hasProperty ( c  )  [abstract]

overridden by woc, returns true if the property exists

WobTable::insert (  ) 

insert the object under a new primary key value into the DB (implicitly calls newKey); returns true on success

WobTable::insertOrUpdate (  ) 

updates existing object in the database or inserts it if it does not exist in the DB yet

WobTable::isAuditable (  ) 

returns whether this is an auditable table

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

WobTable::resetAudit (  )  [protected]

overridden in auditable implementations: resets the audit state

WobTable::revert ( name  ) 

reverts changes to the property

WobTable::revertAll (  ) 

reverts all changes to properties

WobTable::setFromArray ( array $  data  ) 

set multiple properties

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

WobTable::where (  ) 

returns the where clause to find this instance (via primary key columns)


Member Data Documentation

WobTable::$cdata [protected]
WobTable::$data [protected]

The documentation for this class was generated from the following file: