本文整理汇总了PHP中Respond::NotFoundPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Respond::NotFoundPage方法的具体用法?PHP Respond::NotFoundPage怎么用?PHP Respond::NotFoundPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Respond
的用法示例。
在下文中一共展示了Respond::NotFoundPage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __URIParser
private function __URIParser()
{
if (!isset($this->uri)) {
$this->__URIInterpreter();
}
$this->context->useNamespace('service');
$url = $this->uri['fullpath'];
$defaultblogid = $this->context->getProperty('defaultBlogId', 1);
$this->suri = array('url' => $url, 'value' => '');
$this->blogid = null;
$this->uri['isStrictBlogURL'] = true;
$depth = substr_count($this->context->getProperty('path'), '/');
if ($depth > 0) {
if (preg_match('@^((/+[^/]+){' . $depth . '})(.*)$@', $url, $matches) !== FALSE) {
$url = $matches[3];
} else {
Respond::NotFoundPage();
}
}
if ($this->context->getProperty('type') == 'single') {
$this->blogid = $defaultblogid;
} else {
if ($this->context->getProperty('type') == 'domain') {
// Domain-based service
if ($_SERVER['HTTP_HOST'] == $this->context->getProperty('domain')) {
$this->blogid = $defaultblogid;
} else {
$domain = explode('.', $_SERVER['HTTP_HOST'], 2);
if ($domain[1] == $this->context->getProperty('domain')) {
$this->blogid = $this->__getBlogIdByName($domain[0]);
if ($this->blogid === null) {
$this->blogid = $this->__getBlogIdBySecondaryDomain($_SERVER['HTTP_HOST']);
}
} else {
$this->blogid = $this->__getBlogIdBySecondaryDomain($_SERVER['HTTP_HOST']);
}
}
} else {
// Path-based service
if ($url == '/') {
$this->blogid = $defaultblogid;
} else {
if (preg_match('@^/+([^/]+)(.*)$@', $url, $matches)) {
$this->blogid = $this->__getBlogIdByName(strtok($matches[1], '?'));
if ($this->blogid === null) {
$this->blogid = $defaultblogid;
$this->uri['isStrictBlogURL'] = false;
}
$url = $matches[2];
} else {
Respond::NotFoundPage();
}
}
}
if ($this->blogid === null) {
Respond::NotFoundPage();
}
}
if (isset($this->uri['interfacePath'])) {
if (strpos($this->uri['interfacePath'], 'interface/blog/comment') === 0 || strpos($this->uri['interfacePath'], 'interface/blog/trackback') === 0) {
$depth = substr_count($this->uri['interfacePath'], '/') - 2;
} else {
$depth = substr_count($this->uri['interfacePath'], '/') - 1;
}
} else {
$depth = substr_count(ROOT, '/');
}
if ($depth > 0) {
if ($this->context->getProperty('fancyURL') === 0 || $this->context->getProperty('fancyURL') === 1) {
$url = '/' . $this->uri['input'];
}
// Exclude /blog path.
if (preg_match('@^((/+[^/]+){' . $depth . '})/*(.*)$@', $url, $matches)) {
$this->suri['directive'] = $matches[1];
if ($matches[3] !== false) {
$this->suri['value'] = $matches[3];
}
} else {
Respond::NotFoundPage();
}
} else {
$this->suri['directive'] = '/';
$this->suri['value'] = ltrim($url, '/');
}
if (strpos($this->suri['value'], '?') === 0) {
$this->suri['value'] = '';
} else {
$this->suri['value'] = strtok($this->suri['value'], '?');
}
$this->suri['directive'] = strtok($this->suri['directive'], '?');
if (is_numeric($this->suri['value'])) {
$this->suri['id'] = $this->suri['value'];
} else {
$this->suri['value'] = URL::decode(str_replace('index.php', '', $this->suri['value']));
if (is_numeric($isValue = strtok($this->suri['value'], '&'))) {
$this->suri['id'] = $isValue;
}
unset($isValue);
}
// Parse page.
//.........这里部分代码省略.........
示例2: fireEvent
<?php
/// Copyright (c) 2004-2016, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
fireEvent($suri['directive'] . '/' . $suri['value']);
if (!headers_sent()) {
Respond::NotFoundPage();
}
示例3: array
'viewMode' => array('string','default'=>'')
)
);*/
require ROOT . '/library/preprocessor.php';
requireLibrary('blog.skin');
requireModel("blog.sidebar");
requireStrictRoute();
$ctx = Model_Context::getInstance();
$skin = new Skin($ctx->getProperty('skin.skin'));
$sidebarCount = count($skin->sidebarBasicModules);
$sidebarOrderData = getSidebarModuleOrderData($sidebarCount);
if (!isset($_REQUEST['sidebarNumber']) || !is_numeric($_REQUEST['sidebarNumber'])) {
Respond::NotFoundPage($ajaxcall);
}
if (!isset($_REQUEST['modulePos']) || !is_numeric($_REQUEST['modulePos'])) {
Respond::NotFoundPage($ajaxcall);
}
$sidebarNumber = $_REQUEST['sidebarNumber'];
$modulePos = $_REQUEST['modulePos'];
if ($sidebarNumber < 0 || $sidebarNumber >= $sidebarCount) {
Respond::ErrorPage(null, null, null, $ajaxcall);
}
if (!isset($sidebarOrderData[$sidebarNumber]) || !isset($sidebarOrderData[$sidebarNumber][$modulePos])) {
Respond::ErrorPage(null, null, null, $ajaxcall);
}
$pluginData = $sidebarOrderData[$sidebarNumber][$modulePos];
if ($pluginData['type'] != 3) {
Respond::ErrorPage(null, null, null, $ajaxcall);
}
$plugin = $pluginData['id']['plugin'];
$handler = $pluginData['id']['handler'];