public function register()
 {
     // Params
     set_time_limit(0);
     clearstatcache();
     // Error log
     $this->initErrorHandling();
     // External classes
     require_once $this->getCorePath() . '/classes/class.util.php';
     Util::logSeparator();
     // Autoloader
     require_once $this->getCorePath() . '/classes/class.autoloader.php';
     $neardAutoloader = new Autoloader();
     $neardAutoloader->register();
     // Load
     self::loadCore();
     self::loadConfig();
     self::loadLang();
     self::loadBins();
     self::loadTools();
     self::loadApps();
     self::loadWinbinder();
     self::loadRegistry();
     self::loadHomepage();
     // Init
     if ($this->isBootstrap) {
         $this->procs = Win32Ps::getListProcs();
     }
 }
Beispiel #2
0
 /**
  * Test register method registers autoloader class and method properly.
  */
 public function testRegisterRegistersAutoloaderProperly()
 {
     $this->setUpAutoloaderWithStrategy();
     $this->autoloader->register();
     $this->assertAutoloaderRegistered();
     $this->unregisterAutoloaderStrategyMock();
 }
Beispiel #3
0
 /**
  * Asserts that the tokenizer is used as default
  *
  * @return void
  */
 public function testAutoloaderUsesTokenizer()
 {
     $this->assertTrue(AutoloaderFileParser_Tokenizer::isSupported());
     $autoloader = new Autoloader();
     $autoloader->register();
     $autoloader->remove();
     $this->assertTrue($autoloader->getParser() instanceof AutoloaderFileParser_Tokenizer);
 }
 /**
  * Constructor for the evergreen class that sets up all the necessary parts of the framework so it can run.
  * 
  * @access public
  */
 public function __construct()
 {
     $starttime = microtime(true);
     try {
         // register the autoloaders
         Autoloader::register();
         // setup error handling
         set_error_handler(array("Config", "logError"), ini_get("error_reporting"));
         // load the main config.php file
         if (file_exists(Reg::get("Path.physical") . '/config/config.php')) {
             include_once Reg::get("Path.physical") . '/config/config.php';
         } else {
             echo "You are missing the configuration file and without it Evergreen cannot run.";
             exit;
         }
         // load the main errors.php file
         if (file_exists(Reg::get("Path.physical") . '/config/errors.php')) {
             include Reg::get("Path.physical") . '/config/errors.php';
         }
         // check if the welcome content is present and if it is show it
         if (file_exists(Reg::get("Path.physical") . '/public/welcome.php')) {
             // Load the welcome content
             include Reg::get("Path.physical") . '/public/welcome.php';
             exit;
         }
         // code that is run at the exit of the script
         register_shutdown_function(array($this, 'shutdown'), $starttime);
         // process the uri and setup the Reg variables
         Config::processURI();
         // wait till after all the config files are loaded before loading in the autoload files
         Autoloader::loadFiles();
         // build the controller class name
         $load['name'] = Config::uriToClass(Reg::get("URI.working.controller"));
         if (Reg::hasVal("Branch.name")) {
             $load['branch'] = Config::uriToClass(Reg::get("Branch.name"));
         }
         $load['type'] = 'Controller';
         $load = implode('_', $load);
         // create an instance of the controller
         $controller = new $load();
         // run the _showView method in the loaded controller
         $controller->_showView();
     } catch (EvergreenException $e) {
         // handler for the EvergreenException class
         $e->processError();
     } catch (Exception $e) {
         // handler for general exceptions
         if (Config::read("System.mode") != "development") {
             echo Config::read("Error.generalErrorMessage");
             exit;
         } else {
             echo $e;
         }
     }
 }
Beispiel #5
0
 /**
  * __construct
  *
  * Constructs the object.
  *
  * @access public
  * @param  \Pimple $pimple
  * @return void
  */
 public function __construct(\Pimple $pimple)
 {
     $this->pimple = $pimple;
     $this->config = $pimple['config'];
     $this->setReporting();
     $appDir = $this->config['general.appDir'] . 'src';
     $appLoader = new Autoloader($this->config['general.namespace'], $appDir);
     $appLoader->register();
     $this->router = new Router($this->pimple);
     $this->session = $this->pimple['session'];
     $this->session->start();
     $this->session->set('language', $this->session->get('language', $this->config['general.default_language']));
 }
Beispiel #6
0
 /**
  * This method will load and register a new autoloader for the system
  * multiple autoloader instances may be used.
  */
 public static function registerAutoloaders()
 {
     require_once 'Autoloader.php';
     $autoloader = new Autoloader(__NAMESPACE__, BASE);
     $autoloader->register();
     /**
      * Override Basic error handling with Whoops
      */
     $whoopsload = new Autoloader('Whoops', BASE . 'vendor' . DS . 'filp' . DS . 'whoops' . DS . 'src' . DS . '');
     $whoopsload->register();
     $wh = new \Whoops\Run();
     $wh->pushHandler(new \Whoops\Handler\PrettyPageHandler());
     $wh->register();
 }
Beispiel #7
0
 public function run($config)
 {
     Conf::init($config);
     //设置app路由
     if ($_SERVER['REQUEST_URI'] != "/") {
         $server_request_uri = parse_url($_SERVER['REQUEST_URI']);
         $domainInfo = Router::init()->parseDomain($server_request_uri['path'], Conf::init()->getConf("ROUTER"), Conf::init()->getConf("ROUTER")['default']);
         Conf::init()->setAppInfo($domainInfo);
         //注册应用地址
     }
     Autoloader::register(Conf::init()->getAppPath());
     //获取路由表
     $routers = Conf::init()->getRouter();
     //解析url路径
     $actArr = array();
     if ($_SERVER['REQUEST_URI'] === "/") {
         $actArr = Router::init()->getDefaultAct();
     } else {
         $server_request_uri = parse_url($_SERVER['REQUEST_URI']);
         $actArr = Router::init()->parse($server_request_uri['path'], $routers);
     }
     Router::init()->load(Conf::init()->getAppPath(), $actArr);
 }
Beispiel #8
0
<?php

require __DIR__ . '/Autoloader.php';
session_start();
$pewLoader = new Autoloader("pew", __DIR__ . '/../src');
$pewLoader->register();
Beispiel #9
0
<?php

require "app/autoloader.php";
$loader = new Autoloader();
$loader->addNamespace('app', __DIR__ . '/app');
$loader->register();
Beispiel #10
0
 public function testNoExceptionForBitpayClasslike()
 {
     Autoloader::register();
     // Magento Classes
     Autoloader::autoload('Bitpay_Core_Model');
 }
Beispiel #11
0
<?php

/**
 * Load important files
 *
 * @author      Erick Dyck <*****@*****.**>
 * @copyright   (c) Erick Dyck 2015
 */
// Include class loader
$classLoaderFile = _LIB . '/Autoload.php';
if (file_exists($classLoaderFile) === false) {
    echo 'Couldn\'t find class loader file!';
    exit;
}
require $classLoaderFile;
// Register class loader
$classLoader = new Autoloader(null, array(0 => _LIB, 'Module' => _MOD));
$classLoader->register();
 /**
  * @covers Microsite\Autoloader::load
  * @covers Microsite\Autoloader::register
  * @covers Microsite\Autoloader::init
  */
 public function testLoad()
 {
     Autoloader::init();
     Autoloader::register('Testing', BOOTSTRAP_DIR . '/data');
     $this->assertTrue(\Testing\TestClass::get_true());
 }
Beispiel #13
0
<?php

/**
 * @author Rob Apodaca <*****@*****.**>
 * @copyright Copyright (c) 2011, Rob Apodaca
 */
namespace VerticalTab\PillowTest;

class Autoloader
{
    private $basePath;
    public function __construct($basePath)
    {
        $this->basePath = $basePath;
    }
    public function autoLoad($className)
    {
        $filename = $this->basePath . '/' . str_replace('\\', '/', $className) . '.php';
        if (file_exists($filename)) {
            require $filename;
        }
    }
    public function register()
    {
        spl_autoload_register(array($this, 'autoload'));
    }
}
$pillowAutoLoader = new Autoloader(__DIR__ . '/../src/');
$pillowAutoLoader->register();
 /**
  * Register (and instantiate) the autoloader.
  *
  * Call this method after adding all namespaces to the global {$this->autoloader->namespaces} array
  * to register the autoloader.
  * @see Autoloader::register()
  * @return void
  */
 public function register()
 {
     $this->autoloader->register();
 }
Beispiel #15
0
     */
    protected static $_path = null;
    /**
     * @param string $path
     * @return bool
     */
    public static function register($path = null)
    {
        self::$_path = $path ? $path : dirname(__FILE__);
        return spl_autoload_register(array(__CLASS__, 'load'), true, true);
    }
    /**
     * @param string $class
     * @return null
     */
    public static function load($class)
    {
        $prefix = __NAMESPACE__ . '\\';
        $len = strlen($prefix);
        if (strncmp($prefix, $class, $len) !== 0) {
            return;
        }
        $relative_class = substr($class, $len);
        $file = self::$_path . '/' . str_replace('\\', '/', $relative_class) . '.php';
        if (file_exists($file)) {
            require $file;
        }
    }
}
Autoloader::register(dirname(__FILE__));
Beispiel #16
0
	/**
	 * Initializes the framework.  This can only be called once.
	 *
	 * @access	public
	 * @return	void
	 */
	public static function init()
	{
		if (static::$initialized)
		{
			throw new \Exception("You can't initialize Fuel more than once.");
		}
		Autoloader::register();

		static::$_paths = array(APPPATH, COREPATH);

		register_shutdown_function('fuel_shutdown_handler');
		set_exception_handler('fuel_exception_handler');
		set_error_handler('fuel_error_handler');

		// Start up output buffering
		ob_start();

		$config = static::load(APPPATH.'config/config.php');

		static::$profiling = isset($config['profiling']) ? $config['profiling'] : false;

		if (static::$profiling)
		{
			\Profiler::init();
			\Profiler::mark(__METHOD__.' Start');
		}

		static::$cache_dir = isset($config['cache_dir']) ? $config['cache_dir'] : APPPATH.'cache/';
		static::$caching = isset($config['caching']) ? $config['caching'] : false;
		static::$cache_lifetime = isset($config['cache_lifetime']) ? $config['cache_lifetime'] : 3600;

		if (static::$caching)
		{
			static::$path_cache = static::cache('Fuel::path_cache');
		}

		\Config::load($config);

		static::$is_cli = (bool) (php_sapi_name() == 'cli');

		if ( ! static::$is_cli)
		{
			if (\Config::get('base_url') === null)
			{
				\Config::set('base_url', static::generate_base_url());
			}

			\Uri::detect();
		}

		// Run Input Filtering
		\Security::clean_input();

		static::$env = \Config::get('environment');
		static::$locale = \Config::get('locale');

		//Load in the packages
		foreach (\Config::get('always_load.packages', array()) as $package)
		{
			static::add_package($package);
		}

		// Set some server options
		setlocale(LC_ALL, static::$locale);

		// Always load classes, config & language set in always_load.php config
		static::always_load();

		static::$initialized = true;

		if (static::$profiling)
		{
			\Profiler::mark(__METHOD__.' End');
		}
	}
Beispiel #17
0
    {
        return spl_autoload_functions();
    }
    /**
     * Dynamic new, a simple factory.
     * It loads and constructs a class, with provided arguments.
     *
     * @param   bool     $classname    Classname.
     * @param   array    $arguments    Arguments for the constructor.
     * @return  object
     */
    public static function dnew($classname, array $arguments = [])
    {
        $classname = ltrim($classname, '\\');
        if (false === Consistency::entityExists($classname, false)) {
            spl_autoload_call($classname);
        }
        $class = new \ReflectionClass($classname);
        if (empty($arguments) || false === $class->hasMethod('__construct')) {
            return $class->newInstance();
        }
        return $class->newInstanceArgs($arguments);
    }
}
/**
 * Autoloader.
 */
$autoloader = new Autoloader();
$autoloader->addNamespace('Hoa', dirname(__DIR__));
$autoloader->register();
<?php

/**
 * @package   AllediaInstaller
 * @contact   www.alledia.com, hello@alledia.com
 * @copyright 2015 Alledia.com, All rights reserved
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
use Alledia\Installer\AutoLoader;
defined('_JEXEC') or die;
// Setup autoloaded libraries
if (!class_exists('\\Alledia\\Installer\\AutoLoader')) {
    require_once __DIR__ . '/AutoLoader.php';
}
Autoloader::register('Alledia\\Installer', __DIR__);
 /**
  * Produccion::appConsolaOpciones()
  * 
  * Genera la carga de las opciones adicionales
  * que se requieren para la autocarga de las diferentes
  * opciones que se requieren para ejecutar el archivo
  * 
  * @return void
  */
 private function appConsolaOpciones()
 {
     define('ENV_ENTORNO', $this->entorno);
     define('ENV_TIPO', 'MVC');
     date_default_timezone_set(ConfigAcceso::leer($this->aplicacion, 'sistema', 'tiempo', 'zona'));
     require implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Configuracion', 'Parametros.php'));
     $consola = new \AutoCargador('Consola', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));
     $consola->registrar();
     $entidades = new \AutoCargador('Entidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM')));
     $entidades->registrar();
     $formulario = new \AutoCargador('Formularios', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));
     $formulario->registrar();
     $interface = new \AutoCargador('Interfaces', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));
     $interface->registrar();
     Autoloader::register(implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM', 'Proxy')), 'Proxy');
     $utilidades = new \AutoCargador('Utilidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));
     $utilidades->registrar();
     $modeloMVC = new \AutoCargador('Modelo', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Sistema')));
     $modeloMVC->registrarModelo();
     $this->consolaObjeto();
 }
Beispiel #20
0
<?php

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
require_once dirname(__FILE__) . '/../Autoloader.php';
Autoloader::register(true);
Beispiel #21
0
include_once 'api.php';
unregister_globals();
/**
 * change php directory, so you can use relative paths
 * root/system
 */
chdir(dirname(getcwd()));
include_once 'config.php';
include_once 'selftest.php';
// -------------------------------------------------
// register core classes via autoload
// -------------------------------------------------
// parse ini file
$ini = parse_ini_file(ABS_PATH . '/system/autoloader.ini');
foreach ($ini as $class => $file) {
    Autoloader::register($class, ABS_PATH . '/system/' . $file);
}
// -------------------------------------------------
// server variables
// -------------------------------------------------
// set if not available
if (!isset($_SERVER['HTTP_REFERER'])) {
    $_SERVER['HTTP_REFERER'] = '';
}
// set protocol
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : false;
if (!$protocol || $protocol != '1.0' && $protocol != 'HTTP/1.1') {
    $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
}
// set if not available
$_SERVER = array_merge(array('REQUEST_URI' => ''), $_SERVER);
Beispiel #22
0
 /**
  * Asserts that Autoloader::removeAll() removes all instances of Autoloader from
  * the stack
  * 
  * @see Autoloader::removeAll()
  * @return void
  */
 public function testRemoveAllAutoloaders()
 {
     $registeredAutoloaders = Autoloader::getRegisteredAutoloaders();
     $autoloader = new Autoloader();
     $autoloader->register();
     $this->assertEquals(count($registeredAutoloaders), count(Autoloader::getRegisteredAutoloaders()));
     Autoloader::removeAll();
     $this->assertEquals(0, count(Autoloader::getRegisteredAutoloaders()));
     $autoloader = new Autoloader();
     $autoloader->register();
     $this->assertEquals(1, count(Autoloader::getRegisteredAutoloaders()));
     $autoloader = new Autoloader(sys_get_temp_dir());
     $autoloader->register();
     $this->assertEquals(2, count(Autoloader::getRegisteredAutoloaders()));
     Autoloader::removeAll();
     foreach ($registeredAutoloaders as $autoloader) {
         $autoloader->register();
     }
 }
Beispiel #23
0
 /**
  * Main method that runs controller and method depending on params passed in url
  * 
  * @author Krzysztof Kalkhoff
  *        
  */
 public static function run()
 {
     $self = self::getInstance();
     // Register autoloader
     $autoloader = new Autoloader(null, $self->basePath);
     $autoloader->register();
     $controller = $self->getControllerToRun();
     $method = $self->getMethodToRun($controller);
     // First run optional functions
     if (method_exists($controller, 'beforeRun')) {
         $controller->beforeRun();
     }
     if (method_exists($controller, 'beforeMethodRun')) {
         $controller->beforeMethodRun();
     }
     // If response was set in "before" functions, output it instead of method return value
     if (!$controller->getResponse()->isEmpty()) {
         return $self->outputContent($controller->getResponse());
     }
     $self->normalizeMethodArguments($controller, $method);
     // Get content
     $content = call_user_func_array(array($controller, $method), $self->methodArguments);
     // After running optional functions
     if (method_exists($controller, 'afterRun')) {
         $controller->afterRun();
     }
     $self->outputContent($content);
 }
Beispiel #24
0
<?php

ini_set('display_errors', 1);
error_reporting(E_ALL);
$start = microtime(true);
define('FRAME_PATH', __DIR__ . '/../../frame');
define('LIB_PATH', __DIR__ . '/../../libs');
define('VENDOR_PATH', __DIR__ . '/../../demo');
require FRAME_PATH . '/Autoloader.class.php';
//or
//require(FRAME_PATH . '/PsrAutoloader.class.php');
require FRAME_PATH . '/Application.class.php';
$root_path_setting = array('Frame' => FRAME_PATH, 'Libs' => LIB_PATH, 'default' => VENDOR_PATH);
$autoloader = Autoloader::register($root_path_setting);
//or
//$autoloader = PsrAutoloader::register($root_path_setting);
//get the app
$app = \Frame\Application::instance();
//注册module的namespace
$app->scripts_namespace = '\\Demo\\Scripts\\';
$app->singleton('request', function ($c) {
    return new \Libs\Http\BasicScriptsRequest();
});
//router
$app->singleton('router', function ($c) {
    return new \Libs\Router\BasicScriptsRouter($c);
});
$app->singleton('response', function ($c) {
    return new \Libs\Http\BasicScriptsResponse();
});
//声明logWriter
Beispiel #25
0
require SYS_PATH . 'config' . EXT;
require SYS_PATH . 'facades' . EXT;
require SYS_PATH . 'autoloader' . EXT;
/**
 * Load a few of the core configuration files that are loaded for every
 * request to the application. It is quicker to load them manually each
 * request rather than parse the keys for every request.
 */
Config::load('env');
Config::load('storage');
Config::load('application');
Config::load('session');
Config::load('error');
Autoloader::register(MWP_CORE_PATH . 'twig/models/');
Autoloader::register(MWP_CORE_PATH . 'services/');
Autoloader::register(APP_PATH . 'services/');
Autoloader::libraries(array('Twig', 'Linkedstore', 'Arraid'));
/**
 * Register the Autoloader's "load" method on the auto-loader stack.
 * This method provides the lazy-loading of all class files, as well
 * as any PSR-0 compliant libraries used by the application.
 */
spl_autoload_register(array('Laravel\\Autoloader', 'load'));
/**
 * Build the Laravel framework class map. This provides a super fast
 * way of resolving any Laravel class name to its appropriate path.
 * More mappings can also be registered by the developer as needed.
 */
Autoloader::$mappings = array('Laravel\\Arr' => SYS_PATH . 'arr' . EXT, 'Laravel\\Asset' => SYS_PATH . 'asset' . EXT, 'Laravel\\Auth' => SYS_PATH . 'auth' . EXT, 'Laravel\\Benchmark' => SYS_PATH . 'benchmark' . EXT, 'Laravel\\Blade' => SYS_PATH . 'blade' . EXT, 'Laravel\\Config' => SYS_PATH . 'config' . EXT, 'Laravel\\Cookie' => SYS_PATH . 'cookie' . EXT, 'Laravel\\Crypter' => SYS_PATH . 'crypter' . EXT, 'Laravel\\File' => SYS_PATH . 'file' . EXT, 'Laravel\\Form' => SYS_PATH . 'form' . EXT, 'Laravel\\Hash' => SYS_PATH . 'hash' . EXT, 'Laravel\\HTML' => SYS_PATH . 'html' . EXT, 'Laravel\\Inflector' => SYS_PATH . 'inflector' . EXT, 'Laravel\\Input' => SYS_PATH . 'input' . EXT, 'Laravel\\Lang' => SYS_PATH . 'lang' . EXT, 'Laravel\\Memcached' => SYS_PATH . 'memcached' . EXT, 'Laravel\\Messages' => SYS_PATH . 'messages' . EXT, 'Laravel\\Paginator' => SYS_PATH . 'paginator' . EXT, 'Laravel\\Redirect' => SYS_PATH . 'redirect' . EXT, 'System\\Redis' => MWP_SERVICE_PATH . 'eloquent/system/redis' . EXT, 'Laravel\\Request' => SYS_PATH . 'request' . EXT, 'Laravel\\Response' => SYS_PATH . 'response' . EXT, 'Laravel\\Section' => SYS_PATH . 'section' . EXT, 'Laravel\\Str' => SYS_PATH . 'str' . EXT, 'Laravel\\URI' => SYS_PATH . 'uri' . EXT, 'Laravel\\URL' => SYS_PATH . 'url' . EXT, 'Laravel\\Validator' => SYS_PATH . 'validator' . EXT, 'Laravel\\View' => SYS_PATH . 'view' . EXT, 'Laravel\\Cache\\Manager' => SYS_PATH . 'cache/manager' . EXT, 'Laravel\\Cache\\Drivers\\APC' => SYS_PATH . 'cache/drivers/apc' . EXT, 'Laravel\\Cache\\Drivers\\Driver' => SYS_PATH . 'cache/drivers/driver' . EXT, 'Laravel\\Cache\\Drivers\\File' => SYS_PATH . 'cache/drivers/file' . EXT, 'Laravel\\Cache\\Drivers\\Memcached' => SYS_PATH . 'cache/drivers/memcached' . EXT, 'Laravel\\Cache\\Drivers\\Redis' => SYS_PATH . 'cache/drivers/redis' . EXT, 'Laravel\\Database\\Connection' => SYS_PATH . 'database/connection' . EXT, 'Laravel\\Database\\Expression' => SYS_PATH . 'database/expression' . EXT, 'Laravel\\Database\\Manager' => SYS_PATH . 'database/manager' . EXT, 'Laravel\\Database\\Query' => SYS_PATH . 'database/query' . EXT, 'Laravel\\Database\\Connectors\\Connector' => SYS_PATH . 'database/connectors/connector' . EXT, 'Laravel\\Database\\Connectors\\MySQL' => SYS_PATH . 'database/connectors/mysql' . EXT, 'Laravel\\Database\\Connectors\\Postgres' => SYS_PATH . 'database/connectors/postgres' . EXT, 'Laravel\\Database\\Connectors\\SQLite' => SYS_PATH . 'database/connectors/sqlite' . EXT, 'Laravel\\Database\\Eloquent\\Hydrator' => SYS_PATH . 'database/eloquent/hydrator' . EXT, 'Laravel\\Database\\Eloquent\\Model' => SYS_PATH . 'database/eloquent/model' . EXT, 'Laravel\\Database\\Grammars\\Grammar' => SYS_PATH . 'database/grammars/grammar' . EXT, 'Laravel\\Database\\Grammars\\MySQL' => SYS_PATH . 'database/grammars/mysql' . EXT, 'Laravel\\Routing\\Controller' => SYS_PATH . 'routing/controller' . EXT, 'Laravel\\Routing\\Filter' => SYS_PATH . 'routing/filter' . EXT, 'Laravel\\Routing\\Loader' => SYS_PATH . 'routing/loader' . EXT, 'Laravel\\Routing\\Route' => SYS_PATH . 'routing/route' . EXT, 'Laravel\\Routing\\Router' => SYS_PATH . 'routing/router' . EXT, 'Laravel\\Session\\Payload' => SYS_PATH . 'session/payload' . EXT, 'Laravel\\Session\\Drivers\\APC' => SYS_PATH . 'session/drivers/apc' . EXT, 'Laravel\\Session\\Drivers\\Cookie' => SYS_PATH . 'session/drivers/cookie' . EXT, 'Laravel\\Session\\Drivers\\Database' => SYS_PATH . 'session/drivers/database' . EXT, 'Laravel\\Session\\Drivers\\Driver' => SYS_PATH . 'session/drivers/driver' . EXT, 'Laravel\\Session\\Drivers\\Factory' => SYS_PATH . 'session/drivers/factory' . EXT, 'Laravel\\Session\\Drivers\\File' => SYS_PATH . 'session/drivers/file' . EXT, 'Laravel\\Session\\Drivers\\Memcached' => SYS_PATH . 'session/drivers/memcached' . EXT, 'Laravel\\Session\\Drivers\\Redis' => SYS_PATH . 'session/drivers/redis' . EXT, 'Laravel\\Session\\Drivers\\Sweeper' => SYS_PATH . 'session/drivers/sweeper' . EXT);
/**
 * Register the default timezone for the application. This will be
Beispiel #26
0
<?php

use Luke\Console\Command;
use Symfony\Component\Console\Application;
ini_set('error_reporting', -1);
ini_set('display_errors', 'On');
define('DS', DIRECTORY_SEPARATOR);
if ('phar://' === substr(__FILE__, 0, 7)) {
    $basePath = 'phar://' . (include 'phar_name.php');
} else {
    $basePath = realpath(dirname(__FILE__));
}
require $basePath . DS . 'vendor' . DS . 'autoload.php';
require $basePath . DS . 'src' . DS . 'Autoloader.php';
Autoloader::register($basePath . DS . 'src');
$application = new Application();
$application->setName('Electrum/Luke');
$application->setVersion('v0.1');
$application->add(new Command\Test());
$application->run();
<?php

require_once __DIR__ . '/Autoloader.php';
require_once __DIR__ . '/../vendor/autoload.php';
$testDir = __DIR__ . '';
$testLoader = new Autoloader('Tuersteher\\Extension\\Test', $testDir);
$testLoader->register();
$appDir = __DIR__ . '/../src';
$appLoader = new Autoloader('Tuersteher\\Extension', $appDir);
$appLoader->register();
<?php

/**
 * Team Management Tool
 * 
 * This file is the initializer for all requests made to the TMT
 * 
 * @package team-management-tool
 * @license proprietary
 */
namespace TMT;

// Composer Autoloader
require dirname(__FILE__) . "/../vendor/autoload.php";
// Initialize TMT Autoloader
require 'autoload.php';
$al = new Autoloader();
$al->addNamespace("TMT\\app\\", "applications");
$al->addNamespace("TMT\\api\\", "apis");
$al->addNamespace("TMT\\model\\", "models");
$al->addNamespace("TMT\\accessor\\", "accessors");
$al->addNamespace("TMT\\controller\\", "controllers");
$al->addNamespace("TMT\\exception\\", "exceptions");
$al->addNamespace("TMT\\", "libs");
$al->register();
$app = new \TMT\TMT();
$app->handle();
Beispiel #29
0
<?php

ini_set('default_charset', 'UTF-8');
// Bootstrap the framework DO NOT edit this
require COREPATH . 'bootstrap.php';
\Autoloader::add_classes(array());
// Register the autoloader
\Autoloader::register();
/**
 * Your environment.  Can be set to any of the following:
 *
 * Fuel::DEVELOPMENT
 * Fuel::TEST
 * Fuel::STAGING
 * Fuel::PRODUCTION
 */
\Fuel::$env = isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : \Fuel::DEVELOPMENT;
// Initialize the framework with the config file.
\Fuel::init('config.php');
<?php

/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */
define('OSCOM_TIMESTAMP_START', microtime());
require 'Autoloader.php';
$OSCOM_Autoloader = new Autoloader('osCommerce\\OM');
$OSCOM_Autoloader->register();
osCommerce\OM\Core\OSCOM::initialize();