/** * Get request body from client */ public function getRequestBody() { $request = new Request(); if ($request->getContentType() != 'application/json') { throw new \Exception("Wrong content type"); } return $request->getJsonRawBody(); }
/** * @param \Phalcon\Http\Request $request * @return array All request params (GET, POST, PUT, RawJsonBody) */ public static function getMergeParams(Request $request) { $jsonRawBody = (array) $request->getJsonRawBody(true); $params = array_merge((array) $request->get(), (array) $request->getPost(), (array) $request->getPut(), $jsonRawBody); return self::convertDate($params, $request->getDI()); }
public function getJsonRawBody($associative = true) { parent::getJsonRawBody($associative); }
public function getJsonRawBody($associative = false) { return parent::getJsonRawBody($associative); }
public function getJsonRawBody() { return parent::getJsonRawBody(); }