예제 #1
0
파일: Router.php 프로젝트: minond/restful
 /**
  * parses request input
  * @return array
  */
 public function getRequestData()
 {
     $data = $this->request->getInput();
     if (is_null($data) || !strlen($data)) {
         $data = [];
     }
     return is_string($data) ? json_decode($data, true) : $data;
 }
예제 #2
0
파일: RequestTest.php 프로젝트: minond/http
 public function testInputGetterAndSetter()
 {
     $input = 'testing';
     $this->req->setInput($input);
     $this->assertEquals($input, $this->req->getInput());
 }