本文整理汇总了PHP中eZModule::exitStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP eZModule::exitStatus方法的具体用法?PHP eZModule::exitStatus怎么用?PHP eZModule::exitStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZModule
的用法示例。
在下文中一共展示了eZModule::exitStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forward
/**
* Forwards the current execution to another module/view with the existing
* parameters.
*
* @param eZModule $module The eZModule object the request will be forwarded to
* @param string $functionName The function to run in that module
* @param array $parameters
* An array of parameters that will be added to the request. These
* will be merged with the existing parameters
* @return array The forwarded module/view result
*/
function forward($module, $functionName, $parameters = false)
{
$Return = null;
if ($module && $functionName) {
$viewName = self::currentView();
if ($parameters === false) {
$parameters = array();
}
$parameters = array_merge($parameters, $this->OriginalViewParameters);
$unorderedParameters = $this->OriginalUnorderedParameters;
$userParameters = $this->UserParameters;
$Return = $module->run($functionName, $parameters, $unorderedParameters, $userParameters);
// override default navigation part
if ($Return['is_default_navigation_part'] === true) {
if ($this->singleFunction()) {
$function = $this->Module["function"];
} else {
$function = $this->Functions[$functionName];
}
if (isset($function['default_navigation_part'])) {
$Return['navigation_part'] = $function['default_navigation_part'];
}
}
$this->RedirectURI = $module->redirectURI();
$this->setExitStatus($module->exitStatus());
}
return $Return;
}
示例2: dispatchLoop
//.........这里部分代码省略.........
}
if (!$policyChecked) {
$hasAccessToSite = true;
}
} else {
if ($siteAccessResult['accessWord'] === 'yes') {
eZDebugSetting::writeDebug('kernel-siteaccess', "access is yes");
$hasAccessToSite = true;
} else {
if ($siteAccessResult['accessWord'] === 'no') {
$accessList = $siteAccessResult['accessList'];
}
}
}
if ($hasAccessToSite) {
$accessParams = array();
$moduleAccessAllowed = $currentUser->hasAccessToView($this->module, $functionName, $accessParams);
if (isset($accessParams['accessList'])) {
$accessList = $accessParams['accessList'];
}
} else {
eZDebugSetting::writeDebug('kernel-siteaccess', $this->access, 'not able to get access to siteaccess');
$moduleAccessAllowed = false;
if ($ini->variable("SiteAccessSettings", "RequireUserLogin") == "true") {
$this->module = eZModule::exists('user');
if ($this->module instanceof eZModule) {
$moduleResult = $this->module->run('login', array(), array('SiteAccessAllowed' => false, 'SiteAccessName' => $this->access['name']));
$runModuleView = false;
}
}
}
}
$GLOBALS['eZRequestedModule'] = $this->module;
if ($runModuleView) {
if ($objectHasMovedError == true) {
$moduleResult = $this->module->handleError(eZError::KERNEL_MOVED, 'kernel', array('new_location' => $objectHasMovedURI));
} else {
if (!$moduleAccessAllowed) {
if (isset($availableViewsInModule[$functionName]['default_navigation_part'])) {
$defaultNavigationPart = $availableViewsInModule[$functionName]['default_navigation_part'];
}
if (isset($accessList)) {
$moduleResult = $this->module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel', array('AccessList' => $accessList));
} else {
$moduleResult = $this->module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
if (isset($defaultNavigationPart)) {
$moduleResult['navigation_part'] = $defaultNavigationPart;
unset($defaultNavigationPart);
}
} else {
if (!isset($userParameters)) {
$userParameters = false;
}
// Check if we should switch access mode (http/https) for this module view.
eZSSLZone::checkModuleView($this->module->attribute('name'), $functionName);
$moduleResult = $this->module->run($functionName, $params, false, $userParameters);
if ($this->module->exitStatus() == eZModule::STATUS_FAILED && $moduleResult == null) {
$moduleResult = $this->module->handleError(eZError::KERNEL_MODULE_VIEW_NOT_FOUND, 'kernel', array('module' => $moduleName, 'view' => $functionName));
}
}
}
}
} else {
if ($moduleCheck['result']) {
eZDebug::writeError("Undefined module: {$moduleName}", "index");
$this->module = new eZModule("", "", $moduleName);
$GLOBALS['eZRequestedModule'] = $this->module;
$moduleResult = $this->module->handleError(eZError::KERNEL_MODULE_NOT_FOUND, 'kernel', array('module' => $moduleName));
} else {
if ($moduleCheck['view_checked']) {
eZDebug::writeError("View '" . $moduleCheck['view'] . "' in module '" . $moduleCheck['module'] . "' is disabled", "index");
} else {
eZDebug::writeError("Module '" . $moduleCheck['module'] . "' is disabled", "index");
}
$GLOBALS['eZRequestedModule'] = $this->module = new eZModule("", "", $moduleCheck['module']);
$moduleResult = $this->module->handleError(eZError::KERNEL_MODULE_DISABLED, 'kernel', array('check' => $moduleCheck));
}
}
$this->siteBasics['module-run-required'] = false;
if ($this->module->exitStatus() == eZModule::STATUS_RERUN) {
if (isset($moduleResult['rerun_uri'])) {
$this->uri = eZURI::instance($moduleResult['rerun_uri']);
$this->siteBasics['module-run-required'] = true;
} else {
eZDebug::writeError('No rerun URI specified, cannot continue', 'index.php');
}
}
if (is_array($moduleResult)) {
if (isset($moduleResult["pagelayout"])) {
$this->siteBasics['show-page-layout'] = $moduleResult["pagelayout"];
$GLOBALS['eZCustomPageLayout'] = $moduleResult["pagelayout"];
}
if (isset($moduleResult["external_css"])) {
$this->siteBasics['external-css'] = $moduleResult["external_css"];
}
}
}
return $moduleResult;
}
示例3: eZModule
$module = new eZModule("", "", $module_name);
$GLOBALS['eZRequestedModule'] = $module;
$moduleResult = $module->handleError(eZError::KERNEL_MODULE_NOT_FOUND, 'kernel', array('module' => $module_name));
} else {
if ($moduleCheck['view_checked']) {
eZDebug::writeError("View '" . $moduleCheck['view'] . "' in module '" . $moduleCheck['module'] . "' is disabled", "index");
} else {
eZDebug::writeError("Module '" . $moduleCheck['module'] . "' is disabled", "index");
}
$module = new eZModule("", "", $moduleCheck['module']);
$GLOBALS['eZRequestedModule'] = $module;
$moduleResult = $module->handleError(eZError::KERNEL_MODULE_DISABLED, 'kernel', array('check' => $moduleCheck));
}
}
$moduleRunRequired = false;
if ($module->exitStatus() == eZModule::STATUS_RERUN) {
if (isset($moduleResult['rerun_uri'])) {
$uri = eZURI::instance($moduleResult['rerun_uri']);
$moduleRunRequired = true;
} else {
eZDebug::writeError('No rerun URI specified, cannot continue', 'index.php');
}
}
if (is_array($moduleResult)) {
if (isset($moduleResult["pagelayout"])) {
$show_page_layout = $moduleResult["pagelayout"];
$GLOBALS['eZCustomPageLayout'] = $moduleResult["pagelayout"];
}
if (isset($moduleResult["external_css"])) {
$use_external_css = $moduleResult["external_css"];
}
示例4: eZModule
$module = new eZModule( "", "", $module_name );
$GLOBALS['eZRequestedModule'] = $module;
$moduleResult = $module->handleError( eZError::KERNEL_MODULE_NOT_FOUND, 'kernel', array( 'module' => $module_name ) );
}
else
{
if ( $moduleCheck['view_checked'] )
eZDebug::writeError( "View '" . $moduleCheck['view'] . "' in module '" . $moduleCheck['module'] . "' is disabled", "index" );
else
eZDebug::writeError( "Module '" . $moduleCheck['module'] . "' is disabled", "index" );
$module = new eZModule( "", "", $moduleCheck['module'] );
$GLOBALS['eZRequestedModule'] = $module;
$moduleResult = $module->handleError( eZError::KERNEL_MODULE_DISABLED, 'kernel', array( 'check' => $moduleCheck ) );
}
$moduleRunRequired = false;
if ( $module->exitStatus() == eZModule::STATUS_RERUN )
{
if ( isset( $moduleResult['rerun_uri'] ) )
{
$uri = eZURI::instance( $moduleResult['rerun_uri'] );
$moduleRunRequired = true;
}
else
eZDebug::writeError( 'No rerun URI specified, cannot continue', 'index.php' );
}
if ( is_array( $moduleResult ) )
{
if ( isset( $moduleResult["pagelayout"] ) )
{
$show_page_layout = $moduleResult["pagelayout"];