本文整理汇总了PHP中ErrorPage::PageNoParametersRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorPage::PageNoParametersRoute方法的具体用法?PHP ErrorPage::PageNoParametersRoute怎么用?PHP ErrorPage::PageNoParametersRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorPage
的用法示例。
在下文中一共展示了ErrorPage::PageNoParametersRoute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Callback
private function Callback()
{
$ElementsRoute = explode('/', $this->bindParamRoute[0]);
$routePremier = $this->bindParamRoute[0];
unset($this->bindParamRoute[0]);
$NbElements = count($ElementsRoute);
$urlParam = '';
for ($i = 0; $i < $NbElements; $i++) {
$urlParam .= $this->bindParamClient[$i] . '/';
unset($this->bindParamClient[$i]);
}
$urlParam = substr($urlParam, 0, -1);
if ($urlParam == $routePremier) {
if (!empty($this->bindParamRoute) and !empty($this->bindParamClient)) {
$this->param = [];
if (count($this->bindParamRoute) == count($this->bindParamClient)) {
$this->param = array_combine($this->bindParamRoute, $this->bindParamClient);
} else {
if ($this->ErrorPage == FALSE) {
// Aucune route trouvée
$this->ErrorPage = 'param';
require_once 'ErrorPageController.class.php';
$ErrorPage = new ErrorPage();
return $ErrorPage->PageNoParametersRoute();
}
}
}
$this->FileExisted();
$this->ClassExisted();
$method = $this->method . 'Route';
if (method_exists($this->classOn, $method)) {
if (!empty($this->param) and is_array($this->param)) {
$viewparam = '';
foreach ($this->param as $paramdebug) {
$viewparam .= $paramdebug . '/';
}
$this->urlTerminal = '<span class="dpm">Route: <kbd>' . $routePremier . '</kbd></span> <span class="dpm">Parameters: <kbd>' . $viewparam . '</kbd></span> <span class="dpm">Controller: <kbd>' . $this->controller . '</kbd></span> <span class="dpm">Method: <kbd>' . $this->method . '</kbd></span>';
return $this->classOn->{$method}($this->param);
} else {
$this->urlTerminal = '<span class="dpm">Route: <kbd>' . $routePremier . '</kbd></span> <span class="dpm">Parameters: <kbd>N/A</kbd></span> <span class="dpm">Controller: <kbd>' . $this->controller . '</kbd></span> <span class="dpm">Method: <kbd>' . $this->method . '</kbd></span>';
return $this->classOn->{$method}();
}
} else {
if ($this->ErrorPage == FALSE) {
// Aucune route trouvée
$this->ErrorPage = '404';
require_once 'ErrorPageController.class.php';
$ErrorPage = new ErrorPage();
return $ErrorPage->PageNotFoundRoute();
}
}
}
}