Beispiel #1
0
<?php

/**
 * Nora Project
 *
 * @author Hajime MATSUMOTO <*****@*****.**>
 * @copyright 2015 nora-worker.net.
 * @licence https://www.nora-worker.net/LICENCE
 * @version 1.0.0
 */
require_once realpath(__DIR__ . '/../') . '/class/Nora.php';
// オートローダを登録する
Nora::Autoloader()->register();
Beispiel #2
0
 /**
  * オートローダが取得できるか
  *
  * @covers ::Autoloader
  */
 public function testAutoloader()
 {
     $this->assertInstanceOf('Nora\\Core\\Autoloader', Nora::Autoloader());
 }
Beispiel #3
0
 /**
  * スタンドアローン版
  */
 public static function standalone()
 {
     $scope = Scope::create(null, 'NoraScope')->setComponent('Autoloader', function () {
         return Nora::Autoloader();
     })->on('app.pre_configure', function ($e) {
         # モジュールロードパスを追加
         $e->app->ModuleLoader()->addModulePath(realpath(__DIR__ . '/../modules'));
         # コンフィグロードパスを追加
         $e->app->Config()->addConfigDir(realpath(__DIR__ . '/../..') . '/config');
     });
     self::$_app = new App($scope);
     self::configure();
     return self::$_app;
 }