Skip to content
Snippets Groups Projects
Commit 996d1753 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Configuration based on php array

parent edac712e
Branches
No related merge requests found
......@@ -13,10 +13,16 @@ set_include_path($base_path . '/library' . PATH_SEPARATOR .
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
$config = new Zend_Config_Ini($base_path . '/config.ini');
$config = new Zend_Config(include $base_path . '/config.php');
set_include_path($config->modelspath . PATH_SEPARATOR .
get_include_path());
if (isset($config->sgbd)) {
$sql = Zend_Db::factory($config->sgbd->adapter, $config->sgbd->config->toArray());
Zend_Db_Table::setDefaultAdapter($sql);
Zend_Db_Table::getDefaultAdapter()->query('set names "UTF8"');
}
Restful_Bootstrap::bootstrap();
Restful_Model_Configuration::setConfig($config);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment