aliroDatabaseRow Class Reference

Inheritance diagram for aliroDatabaseRow:

aliroDBGeneralRow aliroAdminMenu aliroCommonExtBase aliroErrorRecorder aliroExtension aliroFolder aliroFolderContent aliroMambot aliroMenuItem aliroModule mosUser

List of all members.

Public Member Functions

 __get ($property)
 forceBools ()
 timeStampField ()
 notSQL ()


Detailed Description

Abstract class for classes where the objects of the class can be relatively easily stored in a single database table. Can usually be adapted to more complex cases. notSQL() must return an array of strings, where each string is the name of a variable that is NOT in the database table, or is not written explicitly, e.g. the auto-increment key. If this is the ONLY non-SQL field, then the child class need not implement it, as that it is already in the abstract class. Child classes may implement timeStampField, in which case it must return the name of a field that will have a timestamp placed in it whenever the DB is written.

Definition at line 288 of file aliroDatabaseRow.php.


Member Function Documentation

aliroDatabaseRow::__get ( property  ) 

Definition at line 290 of file aliroDatabaseRow.php.

References aliroDBGeneralRow::getDatabase(), and T_().

00290                                {
00291         $database = $this->getDatabase();
00292         if ('_db' == $property) return $database;
00293         $field = $database->getFieldInfo ($this->tableName, $property);
00294         if (!is_object($field)) trigger_error(T_('Database row attempt to obtain invalid property: ').$property);
00295         else if ('auto_increment' == $field->Extra) return 0;
00296         return $field ? $field->Default : null;
00297     }

aliroDatabaseRow::forceBools (  ) 

Definition at line 301 of file aliroDatabaseRow.php.

00301                            {
00302         return;
00303     }

aliroDatabaseRow::timeStampField (  ) 

Definition at line 306 of file aliroDatabaseRow.php.

00306                                {
00307         return '';
00308     }

aliroDatabaseRow::notSQL (  ) 

Definition at line 312 of file aliroDatabaseRow.php.

00312                        {
00313         return array ($this->rowKey);
00314     }


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

Generated on Wed May 14 13:01:58 2008 for ALIRO by  doxygen 1.5.5