Exemplo n.º 1
0
<?php

ini_set('log_errors', 1);
ini_set('error_log', __DIR__ . '/../tmp/phperrors.log');
//ini_set('session.save_path', __DIR__ . '/../tmp/session');
require __DIR__ . '/../boot.php';
use Lcobucci\ActionMapper2\Config\ApplicationBuilder;
use Lcobucci\DisplayObjects\Core\UIComponent;
use PHPSC\Conference\Infra\Errors\ErrorHandler;
$app = ApplicationBuilder::build(__DIR__ . '/../config/routes.xml', require __DIR__ . '/../config/di-config.php', new ErrorHandler(), 'app.cache');
UIComponent::setBaseUrl($app->getRequest()->getBasePath());
$app->startSession('PHPSC_SSID');
$app->run();
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/../boot.php';
use Lcobucci\ActionMapper2\Config\ApplicationBuilder;
$app = ApplicationBuilder::build(__DIR__ . '/../config/routes.xml');
$app->getRouteManager()->addRoute('/testing', function () use($app) {
    return 'Just kidding ;)';
});
// Appends a new route on the path "/testing"
$app->run();