<commit_before><?php
include('or_config.php');
if (file_exists('db_config.php')) {
    include('db_config.php');
}

chdir(__DIR__);

# util files
foreach (glob('util/*.php') as $util_file) {
    require_once($util_file);
}


# classes
require_once('classes/db_stuff/Db.php');
require_once('classes/db_stuff/DbUtil.php');
require_once('classes/Model.php');
require_once('classes/Controller.php');

if (file_exists('util/custom_includes.php')) {
    require_once('util/custom_includes.php');
}


{ # controllers
    if (!isset($ControllerClass)) {
        $ControllerClass = null;
    }
    foreach (glob('controllers/*.php') as $controller_file) {
        if (!$ControllerClass) {
            $ControllerClass = basename($controller_file, '.php');
        }
        require_once($controller_file);
    }
    if (!$ControllerClass) {
        $ControllerClass = 'ExampleController';
    }
}


# models<commit_msg>allow $trunk to be specified in or_config<commit_after><?php
include('or_config.php');
if (file_exists('db_config.php')) {
    include('db_config.php');
}

if (!isset($trunk)) {
    $trunk = __DIR__;
}
chdir($trunk);

# util files
foreach (glob('util/*.php') as $util_file) {
    require_once($util_file);
}


# classes
require_once('classes/db_stuff/Db.php');
require_once('classes/db_stuff/DbUtil.php');
require_once('classes/Model.php');
require_once('classes/Controller.php');

if (file_exists('util/custom_includes.php')) {
    require_once('util/custom_includes.php');
}


{ # controllers
    if (!isset($ControllerClass)) {
        $ControllerClass = null;
    }
    foreach (glob('controllers/*.php') as $controller_file) {
        echo $controller_file.'<br>';
        if (!$ControllerClass) {
            $ControllerClass = basename($controller_file, '.php');
        }
        require_once($controller_file);
    }
    if (!$ControllerClass) {
        $ControllerClass = 'ExampleController';
    }
}


# models
{'fraction_non_alphanumeric': 0.16778871051268773, 'fraction_numerical': 0.0, 'mean_word_length': 3.9160305343511452, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '3881494', 'n_tokens_mistral': 630, 'n_tokens_neox': 624, 'n_words': 93}