Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- // bootstrap.php
- /**
- * Bootstrap Doctrine.php, register autoloader specify
- * configuration attributes and load models.
- */
- require_once(dirname(__FILE__) . '/lib/vendor/doctrine/Doctrine.php');
- spl_autoload_register(array('Doctrine', 'autoload'));
- $manager = Doctrine_Manager::getInstance();
- $dsn = 'mysql:dbname=ecommerce;host=localhost';
- $user = 'root';
- $password = '******';
- $dbh = new PDO($dsn, $user, $password);
- $conn = Doctrine_Manager::connection($dbh);
- $manager->setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_ALL);
- $manager->setAttribute(Doctrine_Core::ATTR_EXPORT, Doctrine_Core::EXPORT_ALL);
- //$manager->setAttribute(Doctrine_Core::ATTR_MODEL_LOADING, Doctrine_Core::MODEL_LOADING_AGGRESSIVE);
- $manager->setAttribute(Doctrine_Core::ATTR_MODEL_LOADING, Doctrine_Core::MODEL_LOADING_CONSERVATIVE);
- Doctrine_Core::loadModels('models');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement