示例#1
0
文件: index.php 项目: sam0395/sse
<?php

/*
|------------------------------------------------------------
| Register The Composer Auto Loader
|------------------------------------------------------------
|
| Composer provides an autoloader that we can use to load all of our classes
|
*/
require_once dirname(__FILE__) . '/../bootstrap/autoload.php';
/*
|------------------------------------------------------------
| Register The Application
|------------------------------------------------------------
|
| This will initialize the application
|
*/
$app = Trace\Core\Register::getInstance('app');
echo 'welcome to <i>' . $app->getName() . '</i>, version ' . $app->getVersion() . '<br><br>';
use Trace\Core\Model;
$model = new Model(1);
示例#2
0
文件: autoload.php 项目: sam0395/sse
<?php

/*
|------------------------------------------------------------
| Register The Composer Auto Loader
|------------------------------------------------------------
|
| Composer provides an autoloader that we can use to load all of our classes
|
*/
if (!file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
    echo "Please install Composer and run <b>composer install</b> in the working directory.";
    exit;
}
require_once dirname(__FILE__) . '/../vendor/autoload.php';
/*
|------------------------------------------------------------
| Register The main Application
|------------------------------------------------------------
|
| initialize the main application and load configurations
|
*/
Trace\Core\Register::setInstance('app', new Trace\Core\App('Trace'));