<commit_before><?php
// Bootstrap de la aplicacion para personalizarlo
// Para cargar cambia en public/index.php el require del bootstrap a app
function autoload_kbackend($name) {
    if (strncmp($name, 'KBackend', 7) == 0 ) {
        $split = explode('\\', $name);
        $class = $split[2];
        if ($split[1] == 'Model') {
            if (!include APP_PATH . "models/$class.php") {
                throw new KumbiaException("Clase $class no encontrada");
            }
        } elseif ($split[1] == 'Libs') {
            if (!include APP_PATH . "libs/$class.php"){
                throw new KumbiaException("Clase $class no encontrada");
            }
        }
    }elseif ($name == 'Logger'){
		/**
		 * Esto es necesario para no dar problemas con el logger
		 */
		 include APP_PATH . "libs/Logger.php";
    }
}

spl_autoload_register('autoload_kbackend');<commit_msg>Fix the path for autoload The APP_PATH can't be used on other app boostrap<commit_after><?php
// Bootstrap de la aplicacion para personalizarlo
// Para cargar cambia en public/index.php el require del bootstrap a app
function autoload_kbackend($name) {
    $path = dirname(dirname(__FILE__));
    if (strncmp($name, 'KBackend', 7) == 0 ) {
        $split = explode('\\', $name);
        $class = $split[2];
        if ($split[1] == 'Model') {
            if (!include  "$path/models/$class.php") {
                die("$path/models/$class.php");
                throw new KumbiaException("Clase $class no encontrada");
            }
        } elseif ($split[1] == 'Libs') {
            if (!include "$path/libs/$class.php"){
                die("$path/models/$class.php");
                throw new KumbiaException("Clase $class no encontrada");
            }
        }
    }elseif ($name == 'Logger'){
		/**
		 * Esto es necesario para no dar problemas con el logger
		 */
		 include  "$path/libs/Logger.php";
    }
}

spl_autoload_register('autoload_kbackend');
{'fraction_non_alphanumeric': 0.1477857878475798, 'fraction_numerical': 0.005149330587023687, 'mean_word_length': 2.3557858376511227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1756460', 'n_tokens_mistral': 624, 'n_tokens_neox': 590, 'n_words': 159}