summaryrefslogtreecommitdiff
path: root/steloader.php
blob: f878f6fb117e456893972a55374c2e36c50aa801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

/*
 * Very simple autoloader for ste. Will only load ste.
 * Should only be used for the examples and tests in this project.
 * Use a full-fledged PSR-3 autoloader (e.g. the composer loader) for production!
 */

function autoload_ste($cl)
{
    $path = explode("\\", $cl);
    if (($path[0] == "r7r") && ($path[1] == "ste")) {
        require_once(__DIR__ . "/src/ste/" . $path[2] . ".php");
    }
}

spl_autoload_register("autoload_ste");