Ejemplo n.º 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);
Ejemplo n.º 2
0
/**
 * Loads all files recursively a user defined module in the model/
 * directory
 *
 * @param string $module_name
 *        Name of the folder of the module
 * @return boolean
 */
function apine_load_module($module_name)
{
    return Apine\Autoloader::load_module($module_name);
}
Ejemplo n.º 3
0
 * @author Tommy Teasdale <*****@*****.**>
 * @license MIT
 * @copyright 2016 Tommy Teasdale
 */
ini_set('display_errors', -1);
ini_set('include_path', realpath('..'));
$apine_folder = str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__)));
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);