1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Configuration - Levels of configuration.php
2007-02-06 14:40:13 +00:00

21 lines
586 B
PHP

<?php
// setting a global level attribute
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_VLD, false);
// setting a connection level attribute
// (overrides the global level attribute on this connection)
$conn = $manager->openConnection(new PDO('dsn', 'username', 'pw'));
$conn->setAttribute(Doctrine::ATTR_VLD, true);
// setting a table level attribute
// (overrides the connection/global level attribute on this table)
$table = $conn->getTable('User');
$table->setAttribute(Doctrine::ATTR_LISTENER, new UserListener());
?>