本文整理汇总了PHP中Doctrine::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine::initialize方法的具体用法?PHP Doctrine::initialize怎么用?PHP Doctrine::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine
的用法示例。
在下文中一共展示了Doctrine::initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
if (floatval(phpversion()) < 5.4) {
if (!get_magic_quotes_gpc()) {
if (isset($_POST)) {
foreach ($_POST as $key => $value) {
if (is_array($value)) {
$value = implode(',', $value);
}
$_POST[$key] = trim(addslashes($value));
}
}
if (isset($_GET)) {
foreach ($_GET as $key => $value) {
$_GET[$key] = trim(addslashes($value));
}
}
}
}
//Add the required libraries
require_once APP_PATH . "libraries/Error.class.php";
require_once APP_PATH . "libraries/Router.php";
require_once APP_PATH . "libraries/BaseController.class.php";
require_once APP_PATH . "libraries/FrontController.class.php";
require_once APP_PATH . "libraries/Doctrine.class.php";
// initialize the doctrine
Doctrine::initialize();
// create a new instance of FrontController
$frontController = new FrontController($_GET);
$request = $frontController->getRequest();
// router and execute the action
$router = new Router($request);
$router->dispatchAndExecute();