Created
August 19, 2009 11:42
-
-
Save tonio/170304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php'; | |
sfCoreAutoload::register(); | |
class ProjectConfiguration extends sfProjectConfiguration | |
{ | |
public function setup() | |
{ | |
$this->getEventDispatcher()->connect( | |
'request.method_not_found', | |
array('sfRequestExtension', 'listenToMethodNotFound') | |
); | |
} | |
} | |
class sfRequestExtension | |
{ | |
static public function listenToMethodNotFound(sfEvent $event) | |
{ | |
/** | |
* Method getRawBody | |
* retrieve raw post data | |
*/ | |
if ($event['method']=='getRawBody') | |
{ | |
$event->setProcessed(true); | |
$event->setReturnValue(file_get_contents('php://input')); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment