Working with objects - Component overview - Connection - Getting a table object.php 354 Bytes
Newer Older
hansbrix's avatar
hansbrix committed
1 2 3 4 5 6 7 8 9 10 11 12 13
In order to get table object for specified record just call Doctrine_Record::getTable() or Doctrine_Connection::getTable().

<code type="php">
$manager = Doctrine_Manager::getInstance();

// open new connection

$conn = $manager->openConnection(new PDO('dsn','username','password'));

// getting a table object

$table = $conn->getTable('User');
</code>