Skip to content

Instantly share code, notes, and snippets.

@tonio
Created August 19, 2009 11:42
Show Gist options
  • Save tonio/170304 to your computer and use it in GitHub Desktop.
Save tonio/170304 to your computer and use it in GitHub Desktop.
<?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