Skip to content

Instantly share code, notes, and snippets.

@devosc
Created September 5, 2014 07:48
Show Gist options
  • Save devosc/0c821e506c4c85ce5c2d to your computer and use it in GitHub Desktop.
Save devosc/0c821e506c4c85ce5c2d to your computer and use it in GitHub Desktop.
Aura Request Object Di Config
'Request\Value\Factory' => Aura\Web\Request\Accept\Value\ValueFactory::class,
'Request' => new Service(
Application\Request\Request::class,
[
new Service(Aura\Web\Request\Client::class, [$_SERVER]),
new Service(Aura\Web\Request\Content::class, [$_SERVER]),
new Service(
Aura\Web\Request\Globals::class,
[
new Service(Aura\Web\Request\Values::class, [$_COOKIE]),
new Service(Aura\Web\Request\Values::class, [$_ENV]),
new Service(Aura\Web\Request\Files::class, [$_FILES]),
new Service(Aura\Web\Request\Values::class, [$_POST]),
new Service(Aura\Web\Request\Values::class, [$_GET]),
new Service(Aura\Web\Request\Values::class, [$_SERVER]),
]
),
new Service(Aura\Web\Request\Headers::class, [$_SERVER]),
new Service(Aura\Web\Request\Method::class, [$_SERVER, $_POST]),
new Service(
Aura\Web\Request\Accept::class,
[
new Service(Aura\Web\Request\Accept\Charset::class, [new Dependency('Request\Value\Factory'), $_SERVER]),
new Service(Aura\Web\Request\Accept\Encoding::class, [new Dependency('Request\Value\Factory'), $_SERVER]),
new Service(Aura\Web\Request\Accept\Language::class, [new Dependency('Request\Value\Factory'), $_SERVER]),
new Service(Aura\Web\Request\Accept\Media::class, [new Dependency('Request\Value\Factory'), $_SERVER])
]
),
new Service(Aura\Web\Request\Params::class),
new Service(Aura\Web\Request\Url::class, [$_SERVER])
]
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment