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


PHP JpGraphError::Install方法代码示例

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


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

示例1: Raise

        $__jpg_err = $aErrObject;
    }
    function Raise($aMsg, $aHalt = true)
    {
        global $__jpg_err;
        $tmp = new $__jpg_err();
        $tmp->Raise($aMsg, $aHalt);
    }
}
//
// ... and install the default error handler
//
if (USE_IMAGE_ERROR_HANDLER) {
    JpGraphError::Install("JpGraphErrObjectImg");
} else {
    JpGraphError::Install("JpGraphErrObject");
}
//
// Routine to determine if GD1 or GD2 is installed
//
function CheckGDVersion()
{
    $GDfuncList = get_extension_funcs('gd');
    if (!$GDfuncList) {
        return 0;
    } else {
        if (in_array('imagegd2', $GDfuncList) && in_array('imagecreatetruecolor', $GDfuncList)) {
            return 2;
        } else {
            return 1;
        }
开发者ID:hostellerie,项目名称:nexpro,代码行数:31,代码来源:jpgraph.php

示例2: Raise

include $JPGRAPH_PATH . "/jpgraph_bar.php";
#include($JPGRAPH_PATH . "/jpgraph_regstat.php");
if (method_exists(JpGraphError, "Install")) {
    $GLOBALS['JPGRAPH_VERSION'] = 2;
    class JpGraphErrObjectADEIException extends JpGraphErrObject
    {
        function Raise($aMsg, $aHalt = true)
        {
            $num = ADEIException::PLOTTER_EXCEPTION;
            if (preg_match("/to\\s+small\\s+plot\\s+area/i", $aMsg)) {
                $num = ADEIException::PLOTTER_WINDOW_TOO_SMALL;
            }
            throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
        }
    }
    JpGraphError::Install("JpGraphErrObjectADEIException");
} else {
    $GLOBALS['JPGRAPH_VERSION'] = 3;
    JpGraphError::SetImageFlag(false);
    /*
        This is actually is not needed any more, and exceptions should be caught
        by try blocks, I suppose.
        
        class JpGraphADEIException extends JpGraphException {
    	static public function defaultHandler($aMsg,$aHalt=true) {
    	    $num = ADEIException::PLOTTER_EXCEPTION;
    	    if (preg_match("/to\s+small\s+plot\s+area/i", $aMsg)) $num = ADEIException::PLOTTER_WINDOW_TOO_SMALL;
    
    	    throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
    	}
        }
开发者ID:nicolaisi,项目名称:adei,代码行数:31,代码来源:jpgraph.php


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