Skip to content

Commit

Permalink
Implemented: Use property handler for method extraction.
Browse files Browse the repository at this point in the history
This allows custom setups with overriding of HTTP method.
  • Loading branch information
tobyS committed Apr 9, 2012
1 parent 328568b commit c043744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/Qafoo/RMF/Request/HTTP.php
Expand Up @@ -32,10 +32,10 @@ class HTTP extends Request
*/
public function __construct( array $handlers = array() )
{
$this->contents['method'] = $_SERVER['REQUEST_METHOD'];
$this->contents['path'] = $_SERVER['REQUEST_URI'];
$this->contents['variables'] = $_GET;

$this->addHandler( 'method', new Request\PropertyHandler\Server( 'HTTP_METHOD' ) );
$this->addHandler( 'language', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_LANGUAGE', 'en' ) );
$this->addHandler( 'encoding', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_CHARSET', 'utf-8' ) );
$this->addHandler( 'compression', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_ENCODING', 'identity' ) );
Expand Down

0 comments on commit c043744

Please sign in to comment.