コード例 #1
0
<?php

/**
 * APIne Framework Main Execution
 * This script runs basic environment setup and launches the application
 *
 * @author Tommy Teasdale <*****@*****.**>
 * @license MIT
 * @copyright 2015 Tommy Teasdale
 */
ini_set('display_errors', -1);
require_once '.{apine}/Autoloader.php';
$loader = new Apine\Autoloader();
$loader->register();
$apine = new Apine\Application\Application();
$apine->set_mode(APINE_MODE_DEVELOPMENT);
$apine->run(APINE_RUNTIME_HYBRID);
コード例 #2
0
ファイル: utils.php プロジェクト: youmy001/apine-framework
/**
 * Return the instance of the Apine Application
 * 
 * @return Apine\Application\Application
 */
function apine_application()
{
    return Apine\Application\Application::get_instance();
}
コード例 #3
0
ファイル: install.php プロジェクト: youmy001/apine-framework
if (strstr($apine_folder, 'vendor/youmy001')) {
    require_once '../../autoload.php';
} else {
    if (file_exists('../vendor/autoload.php')) {
        require_once '../vendor/autoload.php';
    }
}
require_once $apine_folder . '/Autoloader.php';
$loader = new Apine\Autoloader();
$loader->add_module('Apine', $apine_folder);
$loader->add_module('Apine\\Controllers\\System', $apine_folder . '/Controllers');
$loader->register();
use Apine\Core\Request;
use Apine\Exception\GenericException;
use Apine\Controllers\System as Controllers;
$apine = new Apine\Application\Application();
$apine->set_mode(APINE_MODE_DEVELOPMENT);
try {
    if (count(Request::get()) === 0) {
        $controller = new Controllers\InstallController();
        $view = $controller->index();
    } else {
        $args = explode("/", Request::get()['request']);
        array_shift($args);
        if (count($args) > 1) {
            $controller = $args[0];
            array_shift($args);
            $action = $args[0];
            array_shift($args);
        } else {
            $controller = $args[0];