public function testLoad() { $loader = Eden\Core\Loader::i()->load('Eden\\Core\\Route')->load('Eden_Core_Route'); $this->assertTrue($loader->handler('Eden\\Core\\Route')); $this->assertTrue($loader->handler('Eden_Core_Route')); $this->assertFalse($loader->handler('Eden_Core_Something')); }
<?php //--> /* * This file is part of the Utility package of the Eden PHP Library. * (c) 2012-2013 Openovate Labs * * Copyright and license information can be found at LICENSE * distributed with this package. */ require_once __DIR__ . '/../../Core/Loader.php'; Eden\Core\Loader::i()->addRoot(true, 'Eden\\Core')->addRoot(realpath(__DIR__ . '/../..'), 'Eden\\System')->register()->load('Controller');
<?php //--> /* * This file is part of the Core package of the Eden PHP Library. * (c) 2012-2013 Openovate Labs * * Copyright and license information can be found at LICENSE * distributed with this package. */ require_once __DIR__ . '/../Loader.php'; Eden\Core\Loader::i()->addRoot(true, 'Eden\\Core')->register()->load('Controller');
/** * Construct - start application loader * * @return void */ public function __construct() { parent::__construct(); //turn on autoloader Eden\Core\Loader::i()->addRoot(__DIR__, '')->addRoot(realpath(__DIR__ . '/../package'), '')->register(); }