Example #1
0
<?php

/**
 * Step 1: Require the Kaiser Framework using Composer's autoloader
 */
require __DIR__ . '/vendor/autoload.php';
/**
 * Step 2: Instantiate a Kaiser application
 */
$app = new Kaiser\App();
/**
 * Step 3: Setting Kaiser application Controller
 */
$app->setAppDir([__DIR__ . '/app']);
/**
 * Step 4: Run the Kaiser application
 */
$app->run();
Example #2
0
    exit('Missing vendor files, try running "composer install"' . PHP_EOL);
}
/**
 * -------------------------------------------------------------------
 * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
 * -------------------------------------------------------------------
 */
$loader = (require_once BASE_PATH . '/vendor/autoload.php');
$loader->addPsr4('App\\', BASE_PATH . '/app');
// Application Controller
$loader->addClassMap(['PluploadHandler' => BASE_PATH . '/vendor/mclkim/kaiser/src/Plupload/PluploadHandler.php']);
/**
 * -------------------------------------------------------------------
 * Set up dependencies
 * -------------------------------------------------------------------
 */
require_once BASE_PATH . '/app/dependencies.php';
/**
 * -------------------------------------------------------------------
 * Instantiate the app
 * -------------------------------------------------------------------
 */
$app = new \Kaiser\App($container);
$app->setBasePath(BASE_PATH);
$app->setAppDir([BASE_PATH . '/app']);
/**
 * -------------------------------------------------------------------
 * Run app
 * -------------------------------------------------------------------
 */
$app->run();