本文整理汇总了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;
}
示例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);
}
}