- Timestamp:
- 05/18/12 11:12:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4-expresso-api/prototype/library/tonic/lib/tonic.php
r5888 r6230 126 126 127 127 /** 128 * Body data of incoming request 129 * @var array 130 */ 131 public $dataDecoded; 132 133 /** 128 134 * Array of if-match etags 129 135 * @var str[] … … 298 304 $this->method = strtoupper($this->getConfig($config, 'method', 'REQUEST_METHOD', $this->method)); 299 305 300 // get HTTP request data 301 $this->data = $this->getConfig($config, 'data', NULL, file_get_contents("php://input")); 302 306 // get HTTP request data 307 $this->data = $this->getConfig($config, 'data', NULL, file_get_contents("php://input")); 308 309 // get HTTP request dataDecode into array 310 $this->dataDecoded = $this->__decodeData( $this->data ); 311 303 312 // conditional requests 304 313 if ($config['ifMatch']) { … … 415 424 416 425 } 417 426 427 /** 428 * Convert the string data into a array data 429 * @return array 430 * @codeCoverageIgnore 431 */ 432 function __decodeData($data) { 433 $arrayData = array(); 434 if($data){ 435 $arrayIndex = explode('&', $data); 436 foreach($arrayIndex as $key => $value){ 437 list($i,$val) = explode ('=', $value); 438 $arrayData[$i] = $val; 439 } 440 } 441 return $arrayData; 442 } 443 418 444 /** 419 445 * Convert the object into a string suitable for printing
Note: See TracChangeset
for help on using the changeset viewer.