Exemplo n.º 1
0
 protected function parseRequest(MethodAbstract $method)
 {
     if ($method->hasRequest()) {
         if ($method->getRequest()->getDefinition()->getName() == self::SCHEMA_PASSTHRU) {
             return $this->import(new Record());
         } else {
             return $this->import($method->getRequest());
         }
     } else {
         return new Record();
     }
 }
Exemplo n.º 2
0
 protected function parseRequest(MethodAbstract $method)
 {
     if ($method->hasRequest()) {
         if ($method->getRequest()->getDefinition()->getName() == self::SCHEMA_PASSTHRU) {
             return Transformer::toRecord($this->getBody());
         } else {
             return $this->getBodyAs($method->getRequest());
         }
     } else {
         return new Record();
     }
 }
Exemplo n.º 3
0
 /**
  * Imports the request data based on the schema if available
  *
  * @param \PSX\Api\Resource\MethodAbstract $method
  * @return \PSX\Data\RecordInterface
  */
 protected function parseRequest(MethodAbstract $method)
 {
     return $method->hasRequest() ? $this->import($method->getRequest()) : new Record();
 }