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

namespace Kajona\System\System;


require_once __DIR__."/PharModule.php";
require_once __DIR__."/BootstrapCache.php";

use ReflectionClass;

/**
 * Class-loader for all Kajona classes.
 * Implemented as a singleton.
 *
 * @package module_system
 * @author <EMAIL>
 */
class Classloader
{

    const PREFER_PHAR = false;


    private $intNumberOfClassesLoaded = 0;

    /**
     * @var Classloader
     */
    private static $objInstance = null;

    /**
     * Cached array of the core dirs
     *
     * @var array
     */
    private $arrCoreDirs = array();

    /**
     * List of folder names which are not scanned for classes inside a module folder
     *
     * @var array
     */
    private static $arrCodeFoldersBlacklist = array(
        "docs/",
        "lang/",
        "less/", // installer
        "pics/",
        "scripts/",
        "templates/",
        "vendor/",
    );

    /**
     * Factory method returning an instance of Classloader.
     * The class-loader implements the singleton pattern.
     *
     * @static
     * @return Classloader
     */
    public static function getInstance()
    {
        if (self::$objInstance == null) {
            self::$objInstance = new Classloader();
        }

        return self::$objInstance;
    }

    /**
     * Constructor, initializes the internal fields
     */
    private function __construct()
    {
        $this->scanModules();
        $this->indexAvailableCodefiles();
        $this->bootstrapIncludeModuleIds();<commit_msg>UPDATE: module_system | Classloader > add also node_modules folder<commit_after><?php
/*"******************************************************************************************************
*   (c) 2007-2016 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
********************************************************************************************************/

namespace Kajona\System\System;


require_once __DIR__."/PharModule.php";
require_once __DIR__."/BootstrapCache.php";

use ReflectionClass;

/**
 * Class-loader for all Kajona classes.
 * Implemented as a singleton.
 *
 * @package module_system
 * @author <EMAIL>
 */
class Classloader
{

    const PREFER_PHAR = false;


    private $intNumberOfClassesLoaded = 0;

    /**
     * @var Classloader
     */
    private static $objInstance = null;

    /**
     * Cached array of the core dirs
     *
     * @var array
     */
    private $arrCoreDirs = array();

    /**
     * List of folder names which are not scanned for classes inside a module folder
     *
     * @var array
     */
    private static $arrCodeFoldersBlacklist = array(
        "docs/",
        "lang/",
        "less/", // installer
        "pics/",
        "scripts/",
        "templates/",
        "vendor/",
        "node_modules/",
    );

    /**
     * Factory method returning an instance of Classloader.
     * The class-loader implements the singleton pattern.
     *
     * @static
     * @return Classloader
     */
    public static function getInstance()
    {
        if (self::$objInstance == null) {
            self::$objInstance = new Classloader();
        }

        return self::$objInstance;
    }

    /**
     * Constructor, initializes the internal fields
     */
    private function __construct()
    {
        $this->scanModules();
        $this->indexAvailableCodefiles();
        $this->bootstrapIncludeModuleIds();
{'fraction_non_alphanumeric': 0.20487682252388134, 'fraction_numerical': 0.005530417295123178, 'mean_word_length': 2.1857485988791034, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2998628', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1024, 'n_words': 260}