Configuration - Levels of configuration.php 586 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
<?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)

runa's avatar
runa committed
10
$conn = $manager->openConnection(new PDO('dsn', 'username', 'pw'));
11 12 13 14 15 16 17 18 19 20

$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());
?>