static function main() { Strass_Cache::setup(); $db = Strass_Db::setup(); Zend_Registry::set('acl', new Strass_Installer_FakeAcl()); self::run($db); }
function initDb() { /* optimisation car la création du schéma peut prendre pas mal de temps, et nous somme online */ $db = Strass_Db::setup($this->dbname, true); $dump = $this->sql_dir . '/dump-' . $this->data['site']['association'] . '.sql'; if (!file_exists($dump)) { throw new Exception("Pas de données pour cette association !"); } $sql = file_get_contents($dump); $snippets = array_filter(explode(";\n", $sql)); foreach ($snippets as $snippet) { $db->exec($snippet); } Strass_Version::save(self::VERSION); Strass_Migrate::run($db); }
public function routeStartup() { Strass_Db::setup(); }
<?php $_ENV['STRASS_UNIT_TEST'] = 1; putenv('STRASS_UNIT_TEST=1'); $paths = explode(':', get_include_path()); array_shift($paths); array_unshift($paths, '.', dirname(dirname(__FILE__)) . '/../include'); set_include_path(implode(':', $paths)); require_once 'Strass.php'; require_once 'Orror.php'; chdir(realpath(getenv('STRASS_ROOT'))); Strass::bootstrap(); Orror::init(E_ALL | E_STRICT); Strass_Cache::setup(); Strass_Db::setup(); Zend_Registry::set('config', new Zend_Config(array(), true));