. */ /** * Doctrine Configuration File * * This is a sample implementation of Doctrine * * @package Doctrine * @subpackage Config * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2753 $ * @author Konsta Vesterinen * @author Jonathan H. Wage */ define('SANDBOX_PATH', dirname(__FILE__)); define('DOCTRINE_PATH', dirname(dirname(SANDBOX_PATH)) . DIRECTORY_SEPARATOR . 'lib'); define('DATA_FIXTURES_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'fixtures'); define('MODELS_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'models'); define('MIGRATIONS_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'migrations'); define('SQL_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'sql'); define('YAML_SCHEMA_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'schema'); define('DB_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'sandbox.db'); define('DSN', 'sqlite:///' . DB_PATH); require_once(DOCTRINE_PATH . DIRECTORY_SEPARATOR . 'Doctrine.php'); spl_autoload_register(array('Doctrine', 'autoload')); Doctrine_Manager::connection(DSN, 'sandbox'); Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);