public function parse(Payload $payload)
    {
        $reader = $this->getReader($payload->getContentType(), $payload->getRwType(), $payload->getRwSupported());
        $data   = $reader->read($payload->getData());

        $transformer = $payload->getTransformer();

        if ($transformer === null) {
            $transformer = $this->getDefaultTransformer($payload->getContentType());
        }

        if ($transformer instanceof TransformerInterface) {
            $data = $transformer->transform($data);
        }

        return $data;
    }
public function parse(Payload $payload)
    {
        $reader = $this->getReader($payload->getContentType(), $payload->getRwType(), $payload->getRwSupported());
        $data   = $reader->read($payload->getData());

        $transformer = $payload->getTransformer();

        if ($transformer === null) {
            $transformer = $this->getDefaultTransformer($payload->getContentType());
        }

        if ($transformer instanceof TransformerInterface) {
            $data = $transformer->transform($data);
        }

        return $data;
    }
public function parse ( Payload $ payload ) { $ reader = $ this -> getReader ( $ payload -> getContentType ( ) , $ payload -> getRwType ( ) , $ payload -> getRwSupported ( ) ) ; $ data = $ reader -> read ( $ payload -> getData ( ) ) ; $ transformer = $ payload -> getTransformer ( ) ; if ( $ transformer === null ) { $ transformer = $ this -> getDefaultTransformer ( $ payload -> getContentType ( ) ) ; } if ( $ transformer instanceof TransformerInterface ) { $ data = $ transformer -> transform ( $ data ) ; } return $ data ; }
Parses the payload and returns the data in a normalized format

@param \PSX\Data\Payload $payload
@return \stdClass
@throws StatusCode\UnsupportedMediaTypeException
Parses the payload and returns the data in a normalized format