Esempio n. 1
0
 *
 * No settings should be added to this file that would need to be changed
 * on a per-machine basic (ie local, staging or production).  Any
 * machine-specific settings should be added to _machine_config.php
 */
/**
 * APPLICATION ROOT DIRECTORY
 * If the application doesn't detect this correctly then it can be set explicitly
 */
if (!GlobalConfig::$APP_ROOT) {
    GlobalConfig::$APP_ROOT = realpath("./");
}
/**
 * INCLUDE PATH
 * Adjust the include path as necessary so PHP can locate required libraries
 */
set_include_path(GlobalConfig::$APP_ROOT . '/libs/' . PATH_SEPARATOR . GlobalConfig::$APP_ROOT . '/../libs/' . PATH_SEPARATOR . get_include_path());
/**
 * RENDER ENGINE
 */
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
GlobalConfig::$TEMPLATE_CACHE_PATH = '';
/**
 * ROUTE MAP
 * The route map connects URLs to Controller+Method and additionally maps the
 * wildcards to a named parameter so that they are accessible inside the
 * Controller without having to parse the URL for parameters such as IDs
 */
GlobalConfig::$ROUTE_MAP = array('GET:' => array('route' => 'Default.Home'), 'POST:generate' => array('route' => 'Generator.Generate'), 'POST:analyze' => array('route' => 'Analyzer.Analyze'));
Esempio n. 2
0
// $loader->setUseIncludePath(true);
/**
 * SESSION CLASSES
 * Any classes that will be stored in the session can be added here
 * and will be pre-loaded on every page
 */
require_once "Model/User.php";
/**
 * RENDER ENGINE
 * You can use any template system that implements
 * IRenderEngine for the view layer.  Phreeze provides pre-built
 * implementations for Smarty, Savant, Blade and plain PHP.
 */
require_once 'verysimple/Phreeze/BladeRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'BladeRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/views/';
GlobalConfig::$TEMPLATE_CACHE_PATH = GlobalConfig::$APP_ROOT . '/storage/';
/**
 * ROUTE MAP
 * The route map connects URLs to Controller+Method and additionally maps the
 * wildcards to a named parameter so that they are accessible inside the
 * Controller without having to parse the URL for parameters such as IDs
 */
GlobalConfig::$ROUTE_MAP = array('GET:' => array('route' => 'Default.Home'), 'GET:loginform' => array('route' => 'Secure.LoginForm'), 'POST:login' => array('route' => 'Secure.Login'), 'GET:secureuser' => array('route' => 'Secure.UserPage'), 'GET:secureadmin' => array('route' => 'Secure.AdminPage'), 'GET:logout' => array('route' => 'Secure.Logout'), 'GET:roles' => array('route' => 'Role.ListView'), 'GET:role/(:num)' => array('route' => 'Role.SingleView', 'params' => array('id' => 1)), 'GET:api/roles' => array('route' => 'Role.Query'), 'POST:api/role' => array('route' => 'Role.Create'), 'GET:api/role/(:num)' => array('route' => 'Role.Read', 'params' => array('id' => 2)), 'PUT:api/role/(:num)' => array('route' => 'Role.Update', 'params' => array('id' => 2)), 'DELETE:api/role/(:num)' => array('route' => 'Role.Delete', 'params' => array('id' => 2)), 'GET:users' => array('route' => 'User.ListView'), 'GET:user/(:num)' => array('route' => 'User.SingleView', 'params' => array('id' => 1)), 'GET:api/users' => array('route' => 'User.Query'), 'POST:api/user' => array('route' => 'User.Create'), 'GET:api/user/(:num)' => array('route' => 'User.Read', 'params' => array('id' => 2)), 'PUT:api/user/(:num)' => array('route' => 'User.Update', 'params' => array('id' => 2)), 'DELETE:api/user/(:num)' => array('route' => 'User.Delete', 'params' => array('id' => 2)), 'GET:imovels' => array('route' => 'Imovel.ListView'), 'GET:imovel/(:num)' => array('route' => 'Imovel.SingleView', 'params' => array('id' => 1)), 'GET:api/imovels' => array('route' => 'Imovel.Query'), 'POST:api/imovel' => array('route' => 'Imovel.Create'), 'GET:api/imovel/(:num)' => array('route' => 'Imovel.Read', 'params' => array('id' => 2)), 'PUT:api/imovel/(:num)' => array('route' => 'Imovel.Update', 'params' => array('id' => 2)), 'DELETE:api/imovel/(:num)' => array('route' => 'Imovel.Delete', 'params' => array('id' => 2)), 'GET:tipoimovels' => array('route' => 'TipoImovel.ListView'), 'GET:tipoimovel/(:num)' => array('route' => 'TipoImovel.SingleView', 'params' => array('id' => 1)), 'GET:api/tipoimovels' => array('route' => 'TipoImovel.Query'), 'POST:api/tipoimovel' => array('route' => 'TipoImovel.Create'), 'GET:api/tipoimovel/(:num)' => array('route' => 'TipoImovel.Read', 'params' => array('id' => 2)), 'PUT:api/tipoimovel/(:num)' => array('route' => 'TipoImovel.Update', 'params' => array('id' => 2)), 'DELETE:api/tipoimovel/(:num)' => array('route' => 'TipoImovel.Delete', 'params' => array('id' => 2)), 'GET:api/(:any)' => array('route' => 'Default.ErrorApi404'), 'PUT:api/(:any)' => array('route' => 'Default.ErrorApi404'), 'POST:api/(:any)' => array('route' => 'Default.ErrorApi404'), 'DELETE:api/(:any)' => array('route' => 'Default.ErrorApi404'));
/**
 * FETCHING STRATEGY
 * You may uncomment any of the lines below to specify always eager fetching.
 * Alternatively, you can copy/paste to a specific page for one-time eager fetching
 * If you paste into a controller method, replace $G_PHREEZER with $this->Phreezer
 */
// $GlobalConfig->GetInstance()->GetPhreezer()->SetLoadType("Imovel","fk_imovel_tipo_imovel1",KM_LOAD_EAGER); // KM_LOAD_INNER | KM_LOAD_EAGER | KM_LOAD_LAZY