本文整理汇总了PHP中GlobalConfig::ROUTE_MAP方法的典型用法代码示例。如果您正苦于以下问题:PHP GlobalConfig::ROUTE_MAP方法的具体用法?PHP GlobalConfig::ROUTE_MAP怎么用?PHP GlobalConfig::ROUTE_MAP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlobalConfig
的用法示例。
在下文中一共展示了GlobalConfig::ROUTE_MAP方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
* 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'));
示例2: array
*/
// $loader = require 'vendor/autoload.php';
// $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 "App/ExampleUser.php";
/**
* RENDER ENGINE
* You can use any template system that implements
* IRenderEngine for the view layer. Phreeze provides pre-built
* implementations for Smarty, Savant and plain PHP.
*/
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
/**
* 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' => 'SecureExample.LoginForm'), 'POST:login' => array('route' => 'SecureExample.Login'), 'GET:secureuser' => array('route' => 'SecureExample.UserPage'), 'GET:secureadmin' => array('route' => 'SecureExample.AdminPage'), 'GET:logout' => array('route' => 'SecureExample.Logout'), 'GET:clientes' => array('route' => 'Cliente.ListView'), 'GET:cliente/(:num)' => array('route' => 'Cliente.SingleView', 'params' => array('id' => 1)), 'GET:api/clientes' => array('route' => 'Cliente.Query'), 'POST:api/cliente' => array('route' => 'Cliente.Create'), 'GET:api/cliente/(:num)' => array('route' => 'Cliente.Read', 'params' => array('id' => 2)), 'PUT:api/cliente/(:num)' => array('route' => 'Cliente.Update', 'params' => array('id' => 2)), 'DELETE:api/cliente/(:num)' => array('route' => 'Cliente.Delete', 'params' => array('id' => 2)), 'GET:empresatercerizas' => array('route' => 'Empresaterceriza.ListView'), 'GET:empresaterceriza/(:num)' => array('route' => 'Empresaterceriza.SingleView', 'params' => array('id' => 1)), 'GET:api/empresatercerizas' => array('route' => 'Empresaterceriza.Query'), 'POST:api/empresaterceriza' => array('route' => 'Empresaterceriza.Create'), 'GET:api/empresaterceriza/(:num)' => array('route' => 'Empresaterceriza.Read', 'params' => array('id' => 2)), 'PUT:api/empresaterceriza/(:num)' => array('route' => 'Empresaterceriza.Update', 'params' => array('id' => 2)), 'DELETE:api/empresaterceriza/(:num)' => array('route' => 'Empresaterceriza.Delete', 'params' => array('id' => 2)), 'GET:enderecos' => array('route' => 'Endereco.ListView'), 'GET:endereco/(:num)' => array('route' => 'Endereco.SingleView', 'params' => array('id' => 1)), 'GET:api/enderecos' => array('route' => 'Endereco.Query'), 'POST:api/endereco' => array('route' => 'Endereco.Create'), 'GET:api/endereco/(:num)' => array('route' => 'Endereco.Read', 'params' => array('id' => 2)), 'PUT:api/endereco/(:num)' => array('route' => 'Endereco.Update', 'params' => array('id' => 2)), 'DELETE:api/endereco/(:num)' => array('route' => 'Endereco.Delete', 'params' => array('id' => 2)), 'GET:entregadoreses' => array('route' => 'Entregadores.ListView'), 'GET:entregadores/(:num)' => array('route' => 'Entregadores.SingleView', 'params' => array('id' => 1)), 'GET:api/entregadoreses' => array('route' => 'Entregadores.Query'), 'POST:api/entregadores' => array('route' => 'Entregadores.Create'), 'GET:api/entregadores/(:num)' => array('route' => 'Entregadores.Read', 'params' => array('id' => 2)), 'PUT:api/entregadores/(:num)' => array('route' => 'Entregadores.Update', 'params' => array('id' => 2)), 'DELETE:api/entregadores/(:num)' => array('route' => 'Entregadores.Delete', 'params' => array('id' => 2)), 'GET:itempedidos' => array('route' => 'Itempedido.ListView'), 'GET:itempedido/(:num)' => array('route' => 'Itempedido.SingleView', 'params' => array('id' => 1)), 'GET:api/itempedidos' => array('route' => 'Itempedido.Query'), 'POST:api/itempedido' => array('route' => 'Itempedido.Create'), 'GET:api/itempedido/(:num)' => array('route' => 'Itempedido.Read', 'params' => array('id' => 2)), 'PUT:api/itempedido/(:num)' => array('route' => 'Itempedido.Update', 'params' => array('id' => 2)), 'DELETE:api/itempedido/(:num)' => array('route' => 'Itempedido.Delete', 'params' => array('id' => 2)), 'GET:pedidos' => array('route' => 'Pedido.ListView'), 'GET:pedido/(:num)' => array('route' => 'Pedido.SingleView', 'params' => array('id' => 1)), 'GET:api/pedidos' => array('route' => 'Pedido.Query'), 'POST:api/pedido' => array('route' => 'Pedido.Create'), 'GET:api/pedido/(:num)' => array('route' => 'Pedido.Read', 'params' => array('id' => 2)), 'PUT:api/pedido/(:num)' => array('route' => 'Pedido.Update', 'params' => array('id' => 2)), 'DELETE:api/pedido/(:num)' => array('route' => 'Pedido.Delete', 'params' => array('id' => 2)), 'GET:produtos' => array('route' => 'Produto.ListView'), 'GET:produto/(:num)' => array('route' => 'Produto.SingleView', 'params' => array('id' => 1)), 'GET:api/produtos' => array('route' => 'Produto.Query'), 'POST:api/produto' => array('route' => 'Produto.Create'), 'GET:api/produto/(:num)' => array('route' => 'Produto.Read', 'params' => array('id' => 2)), 'PUT:api/produto/(:num)' => array('route' => 'Produto.Update', 'params' => array('id' => 2)), 'DELETE:api/produto/(:num)' => array('route' => 'Produto.Delete', 'params' => array('id' => 2)), 'GET:usuarios' => array('route' => 'Usuario.ListView'), 'GET:usuario/(:num)' => array('route' => 'Usuario.SingleView', 'params' => array('id' => 1)), 'GET:api/usuarios' => array('route' => 'Usuario.Query'), 'POST:api/usuario' => array('route' => 'Usuario.Create'), 'GET:api/usuario/(:num)' => array('route' => 'Usuario.Read', 'params' => array('id' => 2)), 'PUT:api/usuario/(:num)' => array('route' => 'Usuario.Update', 'params' => array('id' => 2)), 'DELETE:api/usuario/(:num)' => array('route' => 'Usuario.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
*/
示例3: array
/**
* 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
// $GlobalConfig->GetInstance()->GetPhreezer()->SetLoadType("User","fk_user_role",KM_LOAD_EAGER); // KM_LOAD_INNER | KM_LOAD_EAGER | KM_LOAD_LAZY
示例4: array
*/
// $loader = require 'vendor/autoload.php';
// $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 "App/ExampleUser.php";
/**
* RENDER ENGINE
* You can use any template system that implements
* IRenderEngine for the view layer. Phreeze provides pre-built
* implementations for Smarty, Savant and plain PHP.
*/
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
/**
* 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' => 'SecureExample.LoginForm'), 'POST:login' => array('route' => 'SecureExample.Login'), 'GET:secureuser' => array('route' => 'SecureExample.UserPage'), 'GET:secureadmin' => array('route' => 'SecureExample.AdminPage'), 'GET:logout' => array('route' => 'SecureExample.Logout'), 'GET:clientepfs' => array('route' => 'ClientePf.ListView'), 'GET:clientepf/(:num)' => array('route' => 'ClientePf.SingleView', 'params' => array('id' => 1)), 'GET:api/clientepfs' => array('route' => 'ClientePf.Query'), 'POST:api/clientepf' => array('route' => 'ClientePf.Create'), 'GET:api/clientepf/(:num)' => array('route' => 'ClientePf.Read', 'params' => array('id' => 2)), 'PUT:api/clientepf/(:num)' => array('route' => 'ClientePf.Update', 'params' => array('id' => 2)), 'DELETE:api/clientepf/(:num)' => array('route' => 'ClientePf.Delete', 'params' => array('id' => 2)), 'GET:clientepjs' => array('route' => 'ClientePj.ListView'), 'GET:clientepj/(:num)' => array('route' => 'ClientePj.SingleView', 'params' => array('id' => 1)), 'GET:api/clientepjs' => array('route' => 'ClientePj.Query'), 'POST:api/clientepj' => array('route' => 'ClientePj.Create'), 'GET:api/clientepj/(:num)' => array('route' => 'ClientePj.Read', 'params' => array('id' => 2)), 'PUT:api/clientepj/(:num)' => array('route' => 'ClientePj.Update', 'params' => array('id' => 2)), 'DELETE:api/clientepj/(:num)' => array('route' => 'ClientePj.Delete', 'params' => array('id' => 2)), 'GET:logins' => array('route' => 'Login.ListView'), 'GET:login/(:num)' => array('route' => 'Login.SingleView', 'params' => array('id' => 1)), 'GET:api/logins' => array('route' => 'Login.Query'), 'POST:api/login' => array('route' => 'Login.Create'), 'GET:api/login/(:num)' => array('route' => 'Login.Read', 'params' => array('id' => 2)), 'PUT:api/login/(:num)' => array('route' => 'Login.Update', 'params' => array('id' => 2)), 'DELETE:api/login/(:num)' => array('route' => 'Login.Delete', 'params' => array('id' => 2)), 'GET:servicos' => array('route' => 'Servico.ListView'), 'GET:servico/(:any)' => array('route' => 'Servico.SingleView', 'params' => array('id' => 1)), 'GET:api/servicos' => array('route' => 'Servico.Query'), 'POST:api/servico' => array('route' => 'Servico.Create'), 'GET:api/servico/(:any)' => array('route' => 'Servico.Read', 'params' => array('id' => 2)), 'PUT:api/servico/(:any)' => array('route' => 'Servico.Update', 'params' => array('id' => 2)), 'DELETE:api/servico/(:any)' => array('route' => 'Servico.Delete', 'params' => array('id' => 2)), 'GET:veiculos' => array('route' => 'Veiculo.ListView'), 'GET:veiculo/(:any)' => array('route' => 'Veiculo.SingleView', 'params' => array('id' => 1)), 'GET:api/veiculos' => array('route' => 'Veiculo.Query'), 'POST:api/veiculo' => array('route' => 'Veiculo.Create'), 'GET:api/veiculo/(:any)' => array('route' => 'Veiculo.Read', 'params' => array('id' => 2)), 'PUT:api/veiculo/(:any)' => array('route' => 'Veiculo.Update', 'params' => array('id' => 2)), 'DELETE:api/veiculo/(:any)' => array('route' => 'Veiculo.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
*/
示例5: array
*/
// $loader = require 'vendor/autoload.php';
// $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 "App/ExampleUser.php";
/**
* RENDER ENGINE
* You can use any template system that implements
* IRenderEngine for the view layer. Phreeze provides pre-built
* implementations for Smarty, Savant and plain PHP.
*/
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
/**
* 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' => 'SecureExample.LoginForm'), 'POST:login' => array('route' => 'SecureExample.Login'), 'GET:secureuser' => array('route' => 'SecureExample.UserPage'), 'GET:secureadmin' => array('route' => 'SecureExample.AdminPage'), 'GET:logout' => array('route' => 'SecureExample.Logout'), 'GET:bannedipses' => array('route' => 'BannedIps.ListView'), 'GET:bannedips/(:num)' => array('route' => 'BannedIps.SingleView', 'params' => array('id' => 1)), 'GET:api/bannedipses' => array('route' => 'BannedIps.Query'), 'POST:api/bannedips' => array('route' => 'BannedIps.Create'), 'GET:api/bannedips/(:num)' => array('route' => 'BannedIps.Read', 'params' => array('id' => 2)), 'PUT:api/bannedips/(:num)' => array('route' => 'BannedIps.Update', 'params' => array('id' => 2)), 'DELETE:api/bannedips/(:num)' => array('route' => 'BannedIps.Delete', 'params' => array('id' => 2)), 'GET:bannedwordses' => array('route' => 'BannedWords.ListView'), 'GET:bannedwords/(:num)' => array('route' => 'BannedWords.SingleView', 'params' => array('id' => 1)), 'GET:api/bannedwordses' => array('route' => 'BannedWords.Query'), 'POST:api/bannedwords' => array('route' => 'BannedWords.Create'), 'GET:api/bannedwords/(:num)' => array('route' => 'BannedWords.Read', 'params' => array('id' => 2)), 'PUT:api/bannedwords/(:num)' => array('route' => 'BannedWords.Update', 'params' => array('id' => 2)), 'DELETE:api/bannedwords/(:num)' => array('route' => 'BannedWords.Delete', 'params' => array('id' => 2)), 'GET:clientes' => array('route' => 'Cliente.ListView'), 'GET:cliente/(:num)' => array('route' => 'Cliente.SingleView', 'params' => array('codigo' => 1)), 'GET:api/clientes' => array('route' => 'Cliente.Query'), 'POST:api/cliente' => array('route' => 'Cliente.Create'), 'GET:api/cliente/(:num)' => array('route' => 'Cliente.Read', 'params' => array('codigo' => 2)), 'PUT:api/cliente/(:num)' => array('route' => 'Cliente.Update', 'params' => array('codigo' => 2)), 'DELETE:api/cliente/(:num)' => array('route' => 'Cliente.Delete', 'params' => array('codigo' => 2)), 'GET:imoveisbs' => array('route' => 'Imoveisb.ListView'), 'GET:imoveisb/(:num)' => array('route' => 'Imoveisb.SingleView', 'params' => array('id' => 1)), 'GET:api/imoveisbs' => array('route' => 'Imoveisb.Query'), 'POST:api/imoveisb' => array('route' => 'Imoveisb.Create'), 'GET:api/imoveisb/(:num)' => array('route' => 'Imoveisb.Read', 'params' => array('id' => 2)), 'PUT:api/imoveisb/(:num)' => array('route' => 'Imoveisb.Update', 'params' => array('id' => 2)), 'DELETE:api/imoveisb/(:num)' => array('route' => 'Imoveisb.Delete', 'params' => array('id' => 2)), 'GET:languages' => array('route' => 'Language.ListView'), 'GET:language/(:num)' => array('route' => 'Language.SingleView', 'params' => array('id' => 1)), 'GET:api/languages' => array('route' => 'Language.Query'), 'POST:api/language' => array('route' => 'Language.Create'), 'GET:api/language/(:num)' => array('route' => 'Language.Read', 'params' => array('id' => 2)), 'PUT:api/language/(:num)' => array('route' => 'Language.Update', 'params' => array('id' => 2)), 'DELETE:api/language/(:num)' => array('route' => 'Language.Delete', 'params' => array('id' => 2)), 'GET:languagecontents' => array('route' => 'LanguageContent.ListView'), 'GET:languagecontent/(:num)' => array('route' => 'LanguageContent.SingleView', 'params' => array('id' => 1)), 'GET:api/languagecontents' => array('route' => 'LanguageContent.Query'), 'POST:api/languagecontent' => array('route' => 'LanguageContent.Create'), 'GET:api/languagecontent/(:num)' => array('route' => 'LanguageContent.Read', 'params' => array('id' => 2)), 'PUT:api/languagecontent/(:num)' => array('route' => 'LanguageContent.Update', 'params' => array('id' => 2)), 'DELETE:api/languagecontent/(:num)' => array('route' => 'LanguageContent.Delete', 'params' => array('id' => 2)), 'GET:languagekeies' => array('route' => 'LanguageKey.ListView'), 'GET:languagekey/(:num)' => array('route' => 'LanguageKey.SingleView', 'params' => array('id' => 1)), 'GET:api/languagekeies' => array('route' => 'LanguageKey.Query'), 'POST:api/languagekey' => array('route' => 'LanguageKey.Create'), 'GET:api/languagekey/(:num)' => array('route' => 'LanguageKey.Read', 'params' => array('id' => 2)), 'PUT:api/languagekey/(:num)' => array('route' => 'LanguageKey.Update', 'params' => array('id' => 2)), 'DELETE:api/languagekey/(:num)' => array('route' => 'LanguageKey.Delete', 'params' => array('id' => 2)), 'GET:plugins' => array('route' => 'Plugin.ListView'), 'GET:plugin/(:num)' => array('route' => 'Plugin.SingleView', 'params' => array('id' => 1)), 'GET:api/plugins' => array('route' => 'Plugin.Query'), 'POST:api/plugin' => array('route' => 'Plugin.Create'), 'GET:api/plugin/(:num)' => array('route' => 'Plugin.Read', 'params' => array('id' => 2)), 'PUT:api/plugin/(:num)' => array('route' => 'Plugin.Update', 'params' => array('id' => 2)), 'DELETE:api/plugin/(:num)' => array('route' => 'Plugin.Delete', 'params' => array('id' => 2)), 'GET:sessionses' => array('route' => 'Sessions.ListView'), 'GET:sessions/(:any)' => array('route' => 'Sessions.SingleView', 'params' => array('id' => 1)), 'GET:api/sessionses' => array('route' => 'Sessions.Query'), 'POST:api/sessions' => array('route' => 'Sessions.Create'), 'GET:api/sessions/(:any)' => array('route' => 'Sessions.Read', 'params' => array('id' => 2)), 'PUT:api/sessions/(:any)' => array('route' => 'Sessions.Update', 'params' => array('id' => 2)), 'DELETE:api/sessions/(:any)' => array('route' => 'Sessions.Delete', 'params' => array('id' => 2)), 'GET:shorturls' => array('route' => 'Shorturl.ListView'), 'GET:shorturl/(:num)' => array('route' => 'Shorturl.SingleView', 'params' => array('id' => 1)), 'GET:api/shorturls' => array('route' => 'Shorturl.Query'), 'POST:api/shorturl' => array('route' => 'Shorturl.Create'), 'GET:api/shorturl/(:num)' => array('route' => 'Shorturl.Read', 'params' => array('id' => 2)), 'PUT:api/shorturl/(:num)' => array('route' => 'Shorturl.Update', 'params' => array('id' => 2)), 'DELETE:api/shorturl/(:num)' => array('route' => 'Shorturl.Delete', 'params' => array('id' => 2)), 'GET:shorturlfolders' => array('route' => 'ShorturlFolder.ListView'), 'GET:shorturlfolder/(:num)' => array('route' => 'ShorturlFolder.SingleView', 'params' => array('id' => 1)), 'GET:api/shorturlfolders' => array('route' => 'ShorturlFolder.Query'), 'POST:api/shorturlfolder' => array('route' => 'ShorturlFolder.Create'), 'GET:api/shorturlfolder/(:num)' => array('route' => 'ShorturlFolder.Read', 'params' => array('id' => 2)), 'PUT:api/shorturlfolder/(:num)' => array('route' => 'ShorturlFolder.Update', 'params' => array('id' => 2)), 'DELETE:api/shorturlfolder/(:num)' => array('route' => 'ShorturlFolder.Delete', 'params' => array('id' => 2)), 'GET:siteconfigs' => array('route' => 'SiteConfig.ListView'), 'GET:siteconfig/(:num)' => array('route' => 'SiteConfig.SingleView', 'params' => array('id' => 1)), 'GET:api/siteconfigs' => array('route' => 'SiteConfig.Query'), 'POST:api/siteconfig' => array('route' => 'SiteConfig.Create'), 'GET:api/siteconfig/(:num)' => array('route' => 'SiteConfig.Read', 'params' => array('id' => 2)), 'PUT:api/siteconfig/(:num)' => array('route' => 'SiteConfig.Update', 'params' => array('id' => 2)), 'DELETE:api/siteconfig/(:num)' => array('route' => 'SiteConfig.Delete', 'params' => array('id' => 2)), 'GET:statses' => array('route' => 'Stats.ListView'), 'GET:stats/(:num)' => array('route' => 'Stats.SingleView', 'params' => array('id' => 1)), 'GET:api/statses' => array('route' => 'Stats.Query'), 'POST:api/stats' => array('route' => 'Stats.Create'), 'GET:api/stats/(:num)' => array('route' => 'Stats.Read', 'params' => array('id' => 2)), 'PUT:api/stats/(:num)' => array('route' => 'Stats.Update', 'params' => array('id' => 2)), 'DELETE:api/stats/(:num)' => array('route' => 'Stats.Delete', 'params' => array('id' => 2)), 'GET:tarefas' => array('route' => 'Tarefa.ListView'), 'GET:tarefa/(:num)' => array('route' => 'Tarefa.SingleView', 'params' => array('codigo' => 1)), 'GET:api/tarefas' => array('route' => 'Tarefa.Query'), 'POST:api/tarefa' => array('route' => 'Tarefa.Create'), 'GET:api/tarefa/(:num)' => array('route' => 'Tarefa.Read', 'params' => array('codigo' => 2)), 'PUT:api/tarefa/(:num)' => array('route' => 'Tarefa.Update', 'params' => array('codigo' => 2)), 'DELETE:api/tarefa/(:num)' => array('route' => 'Tarefa.Delete', 'params' => array('codigo' => 2)), 'GET:urldomains' => array('route' => 'UrlDomain.ListView'), 'GET:urldomain/(:num)' => array('route' => 'UrlDomain.SingleView', 'params' => array('id' => 1)), 'GET:api/urldomains' => array('route' => 'UrlDomain.Query'), 'POST:api/urldomain' => array('route' => 'UrlDomain.Create'), 'GET:api/urldomain/(:num)' => array('route' => 'UrlDomain.Read', 'params' => array('id' => 2)), 'PUT:api/urldomain/(:num)' => array('route' => 'UrlDomain.Update', 'params' => array('id' => 2)), 'DELETE:api/urldomain/(:num)' => array('route' => 'UrlDomain.Delete', 'params' => array('id' => 2)), 'GET:userses' => array('route' => 'Users.ListView'), 'GET:users/(:num)' => array('route' => 'Users.SingleView', 'params' => array('id' => 1)), 'GET:api/userses' => array('route' => 'Users.Query'), 'POST:api/users' => array('route' => 'Users.Create'), 'GET:api/users/(:num)' => array('route' => 'Users.Read', 'params' => array('id' => 2)), 'PUT:api/users/(:num)' => array('route' => 'Users.Update', 'params' => array('id' => 2)), 'DELETE:api/users/(:num)' => array('route' => 'Users.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
*/
示例6: array
$loader = (require 'vendor/autoload.php');
$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 "App/ExampleUser.php";
/**
* RENDER ENGINE
* You can use any template system that implements
* IRenderEngine for the view layer. Phreeze provides pre-built
* implementations for Smarty, Savant and plain PHP.
*/
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
/**
* 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' => 'SecureExample.LoginForm'), 'POST:login' => array('route' => 'SecureExample.Login'), 'GET:secureuser' => array('route' => 'SecureExample.UserPage'), 'GET:secureadmin' => array('route' => 'SecureExample.AdminPage'), 'GET:logout' => array('route' => 'SecureExample.Logout'), 'GET:productos' => array('route' => 'Producto.ListView'), 'GET:producto/(:num)' => array('route' => 'Producto.SingleView', 'params' => array('id' => 1)), 'GET:api/productos' => array('route' => 'Producto.Query'), 'POST:api/producto' => array('route' => 'Producto.Create'), 'GET:api/producto/(:num)' => array('route' => 'Producto.Read', 'params' => array('id' => 2)), 'PUT:api/producto/(:num)' => array('route' => 'Producto.Update', 'params' => array('id' => 2)), 'DELETE:api/producto/(:num)' => array('route' => 'Producto.Delete', 'params' => array('id' => 2)), 'GET:rubros' => array('route' => 'Rubro.ListView'), 'GET:rubro/(:num)' => array('route' => 'Rubro.SingleView', 'params' => array('id' => 1)), 'GET:api/rubros' => array('route' => 'Rubro.Query'), 'POST:api/rubro' => array('route' => 'Rubro.Create'), 'GET:api/rubro/(:num)' => array('route' => 'Rubro.Read', 'params' => array('id' => 2)), 'PUT:api/rubro/(:num)' => array('route' => 'Rubro.Update', 'params' => array('id' => 2)), 'DELETE:api/rubro/(:num)' => array('route' => 'Rubro.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("Producto","producto_ibfk_1",KM_LOAD_EAGER); // KM_LOAD_INNER | KM_LOAD_EAGER | KM_LOAD_LAZY