示例#1
0
/**
 * Config class' helper
 *
 * @param null $name
 *
 * @return mixed
 */
function config($name = null)
{
    $config = App\Core\Config::getInstance();
    // If no arguments are passed then return the config instance
    if (func_num_args() == 0) {
        return $config;
    }
    return $config->get($name);
}
示例#2
0
<?php

require __DIR__ . '/../bootstrap/start.php';
/**
 * Initialize some system's components
 */
$routing = App\Core\Routing::getInstance();
$config = App\Core\Config::getInstance();
/**
 * Assign our custom exception handler
 */
set_exception_handler([config('app.namespace') . '\\Exceptions\\' . config('app.error_handler'), 'render']);
/**
 * Handle the request
 */
$routing->handleRequest();