<?php
use Fliglio\Flfc as flfc;
use Fliglio\Flfc\DefaultFcChainResolver;
use Fliglio\Flfc\FcChainFactory;
use Fliglio\Flfc\FcChainRunner;
use Fliglio\Flfc\Context;
use Fliglio\Flfc\Request;
use Fliglio\Flfc\Response;
error_reporting(E_ALL | E_STRICT);
ini_set("display_errors" , 1);
require_once dirname(dirname(__FILE__)) . '/vendor/autoload.php';
// Configure Context
$context = Context::get();
$context->setRequest(new Request());
$context->setResponse(new Response());
$context->getRequest()->setCurrentUrl('/' . ltrim($_GET['fliglio_request'], '/'));
$context->getRequest()->setPageNotFoundUrl("@404");
$context->getRequest()->setErrorUrl("@error");
$context->getRequest()->setRawInputStream(file_get_contents('php://input'));
$context->getRequest()->setParams($_REQUEST);
// Configure Front Controller Chain & Default Resolver
$chain = new flfc\HttpApp(new flfc\ModuleApp());
$resolver = new DefaultFcChainResolver($chain);
FcChainFactory::addResolver($resolver);
// Run App
$chainRunner = new FcChainRunner();
$chainRunner->dispatchRequest(Context::get());
-
Notifications
You must be signed in to change notification settings - Fork 0
fliglio/flfc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published