->tableName() – Get or set the table name of an object


object $DB_DataObject->tableName ( string $name )


Without any argument, it returns the table name that the object deals with. With a string, it will set the table name for the instance of the object.


This function can not be called statically.


getting and setting the tablename

= new DataObjects_Person;
// echo's person

// now use the same object to query the extra_people table

$person->id 12;

// you can also use this in conjunction with table(), to create dataobjects for random tables..

$d = new DB_DataObject;

$d->id 12;
// should do the same as above..!
check object data, and call objects validation methods. (Previous) Get or set the database the object uses (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.