This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/application/classes/lnApp/JPGraph.php
2012-11-27 12:28:48 +11:00

30 lines
916 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This is class helps with rendering JPGraph images.
*
* @package lnApp
* @subpackage JPGraph
* @category Helpers
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_JPGraph {
public function __construct() {
// JPGraph should be installed in a our includes dir
$jpgraph = DOCROOT.'includes/jpgraph/src';
if (! file_exists($jpgraph.'/jpgraph_gantt.php'))
throw new Kohana_Exception('jpgraph_gantt.php must be installed in '.$jpgraph);
if (! function_exists('imagetypes') && ! function_exists('imagecreatefromstring'))
throw new Kohana_Exception('It seems that GD support is not available. Please add GD support to your PHP configuration.');
require_once($jpgraph.'/jpgraph.php');
return $jpgraph;
}
}
?>