Ticket #23 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Make RAW_POST_DATA accessible

Reported by: schst Assigned to: mikey
Priority: major Milestone:
Component: Request Version: SVN-trunk
Keywords: Cc:

Description

Currently, it is not possible to get the raw post data from the stubRequest object. This is required for web-services like JSON-RPC or SOAP.

Change History

03/21/07 14:03:54 changed by schst

  • component changed from core to Request.

03/21/07 14:12:09 changed by mikey

  • milestone changed from Version 0.1.0 to Version 0.2.0.

03/21/07 16:13:49 changed by mikey

  • status changed from new to assigned.

03/21/07 17:55:39 changed by mikey

  • status changed from assigned to closed.
  • resolution set to fixed.

Feature added with changeset 409.

Three new methods were added to the stubRequest interface which allow acces to the raw data:

<?php
/**
 * checks whether raw data is valid or not
 *
 * @param   stubValidator  $validator  validator to use
 * @return  bool
 */
public function validateRawData(stubValidator $validator);

/**
 * returns the validated raw data
 * 
 * If the validator says the raw data is not valid the return value is null.
 *
 * @param   stubValidator  $validator  validator to use
 * @return  string
 */
public function getValidatedRawData(stubValidator $validator);

/**
 * returns the raw data filtered
 *
 * @param   stubFilter  $filter
 * @return  mixed
 * @throws  stubFilterException
 */
public function getFilteredRawData(stubFilter $filter);
?>

Request classes that extend the stubAbstractRequest class have to implement a new method:

<?php
/**
 * returns the raw data
 *
 * @return  string
 */
protected function getRawData()
?>

This method returns the raw data, in case of the stubWebRequest class this is the raw post data.

07/02/07 10:40:45 changed by

  • milestone deleted.

Milestone 0.2.0 deleted