<?php
require_once 'PHP/Debug/Renderer/Common.php';
@package @category @author @since @package @filesource
@version $Id: Renderer.php,v 1.1 2008/05/02 14:26:37 c0il Exp $
class PHP_Debug_Renderer
{
@param @param @access
public static function factory($debugObject, $options)
{
$className = 'PHP_Debug_Renderer_'. $options['render_type'].
'_'. $options['render_mode'];
$classPath = 'PHP/Debug/Renderer/'. $options['render_type'].
'/'. $options['render_mode']. '.php';
include_once $classPath;
if (class_exists($className)) {
$obj = new $className($debugObject, $options);
} else {
include_once 'PEAR.php';
PEAR::raiseError('PHP_Debug: renderer >' .
$options['DEBUG_render_mode'] . '< not found', true);
return NULL;
}
return $obj;
}
} |