質問

Is there a way to log the received POST request data before the data validation stage implemented via Restler?

役に立ちましたか?

解決

Use the onValidate event, it fires just before validation starts

//in your index.php after $r = new Restler()

$r->onValidate(function() use ($r){
    Logger::log($r->getRequestData());
}

他のヒント

Copy them to a variable, and validate values inside the variable:'

$my_post = $_POST;

//consider we want to validate some query-parameter called q

if(isset($my_post['q']) && ! empty($my_post['p'])) {
    //do something
} 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top