Skip to content

Instantly share code, notes, and snippets.

@kelunik
Created February 4, 2014 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kelunik/8809285 to your computer and use it in GitHub Desktop.
Save kelunik/8809285 to your computer and use it in GitHub Desktop.
<?php
set_include_path(__DIR__."/../:.");
require('autoload.php');
require('functions.php');
require('Libraries/Tpl.php');
use Arya\Request;
use Arya\Response;
$uriFix = function(Request $request) {
$appUri = dirname(dirname($request['PHP_SELF']));
$request['REQUEST_URI_PATH'] = substr($request['REQUEST_URI_PATH'], strlen($appUri));
};
function requestRespond(Request $request) {
return "<!DOCTYPE html><html><head></head><body><h1>It Works!</h1></body></html>";
}
$app = (new \Arya\Application($injector))
//->route('GET', '', 'requestRespond')
->route('POST', '', 'requestRespond')
->run()
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment