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(); } }
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(); } }
/** * 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(); }