diff --git a/tools/sandbox/cli b/tools/sandbox/cli new file mode 100755 index 000000000..a8bd6e2c9 --- /dev/null +++ b/tools/sandbox/cli @@ -0,0 +1,4 @@ +#!/usr/bin/env php + DATA_FIXTURES_PATH, + 'models_path' => MODELS_PATH, + 'migrations_path' => MIGRATIONS_PATH, + 'sql_path' => SQL_PATH, + 'yaml_schema_path' => YAML_SCHEMA_PATH); + +$cli = new Doctrine_Cli($config); +$cli->run($_SERVER['argv']); diff --git a/tools/sandbox/config.php.dist b/tools/sandbox/config.php.dist new file mode 100644 index 000000000..730c31381 --- /dev/null +++ b/tools/sandbox/config.php.dist @@ -0,0 +1,52 @@ +. + */ + +/** + * 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(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')); + +$pdo = new PDO(DSN); +Doctrine_Manager::connection($pdo, 'sandbox'); \ No newline at end of file diff --git a/tools/sandbox/index.php.dist b/tools/sandbox/index.php.dist new file mode 100644 index 000000000..2af5fa0c0 --- /dev/null +++ b/tools/sandbox/index.php.dist @@ -0,0 +1,2 @@ +