Skip to content

Instantly share code, notes, and snippets.

@devosc
Last active August 29, 2015 14:15
Show Gist options
  • Save devosc/150dedb2abf8aeb373ad to your computer and use it in GitHub Desktop.
Save devosc/150dedb2abf8aeb373ad to your computer and use it in GitHub Desktop.
array values instead of container
$config = [
'alias' => [],
'events' => ['Mvc' => [function($route, $request) { var_dump($route, $request); }]],
'services' => [
'Response' => new Response\HttpResponse,
'Route' => new RouteConfig([
'hostname' => 'localhost',
'method' => 'GET',
'path' => '/',
'scheme' => 'http'
]),
'request' => new Request\HttpRequest($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER),
]
];
(new App($config))->call(new Mvc(new Config($config['services'])));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment