Example #1
0
<?php

// rythm core file
require_once dirname(__FILE__) . '/../config/AppConfig.class.php';
$domain = explode('.', $_SERVER['HTTP_HOST']);
$reversed_domain = array_reverse($domain);
$allow_apps = array('backend', 'rblog');
if (isset($reversed_domain[2])) {
    $app = $reversed_domain[2];
    // subdomain
}
if (!in_array($app, $allow_apps)) {
    $app = 'rblog';
}
$config = AppConfig::getAppConfig($app, 'dev');
rtDispatcher::dispatch($config);
Example #2
0
<?php

require_once 'config/AppConfig.class.php';
AppConfig::getAppConfig('rblog', 'dev');
Rythm::init();
// Include your Doctrine configuration/setup here, your connections, models, etc.
// Configure Doctrine Cli
// Normally these are arguments to the cli tasks but if they are set here the arguments will be auto-filled and are not required for you to enter them.
$config = array('data_fixtures_path' => '/path/to/data/fixtures', 'models_path' => rtConfig::get('rt_project_dir') . DS . 'lib' . DS . 'models', 'migrations_path' => ROOT_DIR . DS . 'data' . DS . 'migrations', 'sql_path' => rtConfig::get('rt_data_dir') . DS . 'sql', 'yaml_schema_path' => rtConfig::get('rt_config_dir') . DS . 'schema.yml');
$cli = new Doctrine_Cli($config);
$cli->run($_SERVER['argv']);