array( /* 'log' => array( 'level' => PEAR_LOG_DEBUG, 'type' => 'firebug', 'name' => '', 'options' => array( 'buffering' => TRUE, 'lineFormat' => '[server] %1$s %2$s [%3$s] %4$s', 'timeFormat' => '%b %d %H:%M:%S' ), ), */ ), 'prod' => array( ) ); /** * Base config used in all environments. */ $CONFIG_BASE = array( 'dirs' => array( 'app' => APP_ROOT, 'data' => ( $data_dir = APP_ROOT . '/data' ), 'outlines' => ( $outlines_dir = $data_dir . '/outlines' ), 'logs' => APP_ROOT . '/logs', 'templates' => APP_ROOT . '/templates', 'actions' => APP_ROOT . '/actions', ), 'store' => array( 'class' => 'XoxoOutliner_OutlineStore', 'options' => array( 'dir' => $data_dir . '/outlines', 'backup_dir' => $data_dir . '/backups' ), ), 'log' => array( 'level' => PEAR_LOG_DEBUG, 'type' => 'file', 'name' => APP_ROOT . '/logs/debug-' . date('Y-m-d') . '.log', 'options' => array( ), ), 'routes' => array( 'POST /outlines' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'Create' ), 'GET /outlines/(.*);delete' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'ConfirmDelete', 'params' => array('outline_path'=>NULL) ), 'POST /outlines/(.*);delete' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'Delete', 'params' => array('outline_path'=>NULL) ), 'GET /outlines/(.*);edit' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'Edit', 'params' => array('outline_path'=>NULL) ), 'GET /outlines/(.*);editpane' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'EditPane', 'params' => array('outline_path'=>NULL) ), 'GET /outlines/(.*)' => array( 'module' => 'XoxoOutliner_OutlineAPIActions', 'action' => 'View', 'params' => array('outline_path'=>NULL) ), 'PUT /outlines/(.*)' => array( 'module' => 'XoxoOutliner_OutlineAPIActions', 'action' => 'Save', 'params' => array('outline_path'=>NULL) ), 'DELETE /outlines/(.*)' => array( 'module' => 'XoxoOutliner_OutlineAPIActions', 'action' => 'Delete', 'params' => array('outline_path'=>NULL) ), 'GET (.*)' => array( 'module' => 'XoxoOutliner_OutlineUIActions', 'action' => 'Index', 'params' => array('path_info'=>NULL) ), 'default' => array( 'action' => 'default' ) ) ); /** * Merge base with environmental to derive current config. * TODO: This is simpleminded. Find a better way than this or array_merge_recursive */ global $CONFIG; $CONFIG = array_merge( $CONFIG_BASE, array_key_exists(APP_ENV, $CONFIG_ENV) ? $CONFIG_ENV[APP_ENV] : array() );