<commit_before><?php
/*"******************************************************************************************************
*   (c) 2007-2014 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                                      *
********************************************************************************************************/

/**
 * Generates a graph-instance based on the current config.
 * Therefore either ez components or pChart will be used.
 * Since pChart won't be shipped with kajona, the user has to download it manually.
 *
 * @author <EMAIL>
 * @since 3.4
 * @package module_system
 */
class class_graph_factory {
    //put your code here

    public static $STR_TYPE_EZC = "ezc";
    public static $STR_TYPE_PCHART = "pchart";
    public static $STR_TYPE_FLOT = "flot";
    public static $STR_TYPE_JQPLOT = "jqplot";
    public static $STR_TYPE_HIGHCHARTS = "highcharts";


    /**
     * Creates a graph-instance either based on the current config or
     * based on the passed param
     *
     * @param string $strType
     *
     * @throws class_exception
     * @return interface_graph
     */
    public static function getGraphInstance($strType = "") {

        if($strType == "") {
            if(defined("_system_graph_type_"))
                $strType = _system_graph_type_;
            else
                $strType = "jqplot";
        }

        $strClassname = "class_graph_".$strType;
        $strPath = class_resourceloader::getInstance()->getPathForFile("/system/".$strClassname.".php");
        if($strPath !== false) {
            $objReflection = new ReflectionClass($strClassname);
            if(!$objReflection->isAbstract() && $objReflection->implementsInterface("interface_graph"))
                return $objReflection->newInstance();
        }

        throw new class_exception("Requested charts-plugin ".$strType." not existing", class_exception::$level_FATALERROR);
    }
}
<commit_msg>UPDATE: module_system | graph factory -> removed entry for highcharts since the module was removed to kajonaplayground<commit_after><?php
/*"******************************************************************************************************
*   (c) 2007-2014 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                                      *
********************************************************************************************************/

/**
 * Generates a graph-instance based on the current config.
 * Therefore either ez components or pChart will be used.
 * Since pChart won't be shipped with kajona, the user has to download it manually.
 *
 * @author <EMAIL>
 * @since 3.4
 * @package module_system
 */
class class_graph_factory {
    //put your code here

    public static $STR_TYPE_EZC = "ezc";
    public static $STR_TYPE_PCHART = "pchart";
    public static $STR_TYPE_FLOT = "flot";
    public static $STR_TYPE_JQPLOT = "jqplot";


    /**
     * Creates a graph-instance either based on the current config or
     * based on the passed param
     *
     * @param string $strType
     *
     * @throws class_exception
     * @return interface_graph
     */
    public static function getGraphInstance($strType = "") {

        if($strType == "") {
            if(defined("_system_graph_type_"))
                $strType = _system_graph_type_;
            else
                $strType = "jqplot";
        }

        $strClassname = "class_graph_".$strType;
        $strPath = class_resourceloader::getInstance()->getPathForFile("/system/".$strClassname.".php");
        if($strPath !== false) {
            $objReflection = new ReflectionClass($strClassname);
            if(!$objReflection->isAbstract() && $objReflection->implementsInterface("interface_graph"))
                return $objReflection->newInstance();
        }

        throw new class_exception("Requested charts-plugin ".$strType." not existing", class_exception::$level_FATALERROR);
    }
}

{'fraction_non_alphanumeric': 0.23358812949640287, 'fraction_numerical': 0.00539568345323741, 'mean_word_length': 2.153082919914954, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6710051', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1083, 'n_words': 274}