1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/codes/Configuration - Levels of configuration.php

21 lines
586 B
PHP
Raw Normal View History

<?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)
2007-02-06 17:40:13 +03:00
$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());
?>