当前位置: 首页>>代码示例>>PHP>>正文


PHP PEAR_Singleton::RaiseError方法代码示例

本文整理汇总了PHP中PEAR_Singleton::RaiseError方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_Singleton::RaiseError方法的具体用法?PHP PEAR_Singleton::RaiseError怎么用?PHP PEAR_Singleton::RaiseError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PEAR_Singleton的用法示例。


在下文中一共展示了PEAR_Singleton::RaiseError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

        $service = new $action();
        $timer->logTime('Start launch of action');
        $service->launch();
        $timer->logTime('Finish launch of action');
    } elseif (class_exists($moduleActionClass, false)) {
        /** @var Action $service */
        $service = new $moduleActionClass();
        $timer->logTime('Start launch of action');
        $service->launch();
        $timer->logTime('Finish launch of action');
    } else {
        PEAR_Singleton::raiseError(new PEAR_Error('Unknown Action'));
    }
} else {
    $requestURI = $_SERVER['REQUEST_URI'];
    PEAR_Singleton::RaiseError(new PEAR_Error("Cannot Load Action '{$action}' for Module '{$module}' request '{$requestURI}'"));
}
$timer->logTime('Finished Index');
$timer->writeTimings();
//$analytics->finish();
function processFollowup()
{
    global $configArray;
    switch ($_REQUEST['followup']) {
        case 'SaveSearch':
            header("Location: {$configArray['Site']['path']}/" . $_REQUEST['followupModule'] . "/" . $_REQUEST['followupAction'] . "?" . $_REQUEST['recordId']);
            die;
            break;
    }
}
/**
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:31,代码来源:index.php

示例2: initBasicSearch

 /**
  * Initialize the object's search settings for a basic search found in the
  * $_REQUEST superglobal.
  *
  * @access  protected
  * @return  boolean  True if search settings were found, false if not.
  */
 protected function initBasicSearch()
 {
     // If no lookfor parameter was found, we have no search terms to
     // add to our array!
     if (!isset($_REQUEST['lookfor'])) {
         return false;
     }
     // If lookfor is an array, we may be dealing with a legacy Advanced
     // Search URL.  If there's only one parameter, we can flatten it,
     // but otherwise we should treat it as an error -- no point in going
     // to great lengths for compatibility.
     if (is_array($_REQUEST['lookfor'])) {
         if (count($_REQUEST['lookfor']) == 1) {
             $_REQUEST['lookfor'] = strip_tags($_REQUEST['lookfor'][0]);
         } else {
             PEAR_Singleton::RaiseError(new PEAR_Error("Unsupported search URL."));
             die;
         }
     }
     // If no type defined use default
     if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
         $type = $_REQUEST['type'];
         // Flatten type arrays for backward compatibility:
         if (is_array($type)) {
             $type = strip_tags($type[0]);
         } else {
             $type = strip_tags($type);
         }
     } else {
         $type = $this->defaultIndex;
     }
     $this->searchTerms[] = array('index' => $type, 'lookfor' => $_REQUEST['lookfor']);
     return true;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:41,代码来源:Base.php


注:本文中的PEAR_Singleton::RaiseError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。