Пример #1
0
    $CH = Loader::getClass('Sky.core.Cache');
    if ($CH_OUT = $CH->read(implode($RTR->segments, '.'))) {
        $OUT->append(View::getTemp());
        $LOG->write(100, 'Cache Rendered');
        goto OUTPUT;
    }
}
/*
|--------------------------------------------------------------------------
| Starting Controller Benchmark
|--------------------------------------------------------------------------
*/
$BM->mark('start_controller');
$PATH = $RTR->getPath();
if (!file_exists($PATH)) {
    Exceptions::show404();
}
$ns = DS . (require_once $PATH) . DS;
/*
|--------------------------------------------------------------------------
| Parse possibility namespace and class 
|--------------------------------------------------------------------------
*/
$nsclass = [$class, DS . 'App' . DS . 'controller' . DS . $class, $ns . $class];
foreach ($nsclass as $name) {
    if (class_exists($name)) {
        $class = $name;
        break;
    }
}
$SKY = new $class();