src/SecucardConnect/Util/MapperUtil.php
public static function mapResponse(ResponseInterface $response, $class = null, LoggerInterface $logger = null)
    {
        $dec = self::jsonDecode((string)$response->getBody());
        if ($class != null) {
            return self::map($dec, $class, $logger);
        }
        return $dec;
    }
public static function mapResponse(ResponseInterface $response, $class = null, LoggerInterface $logger = null)
    {
        $dec = self::jsonDecode((string)$response->getBody());
        if ($class != null) {
            return self::map($dec, $class, $logger);
        }
        return $dec;
    }
public static function mapResponse ( ResponseInterface $ response , $ class = null , LoggerInterface $ logger = null ) { $ dec = self :: jsonDecode ( ( string ) $ response -> getBody ( ) ) ; if ( $ class != null ) { return self :: map ( $ dec , $ class , $ logger ) ; } return $ dec ; }
Maps a response body which contains JSON to an object of a given class or to default PHP types.
@param ResponseInterface $response The response
@param string $class The full qualified name of the class to map to or null to map to default types.
@param LoggerInterface|null $logger
@return mixed The created instance, never null.
@throws \Exception If the mapping could not completed.
Maps a response body which contains JSON to an object of a given class or to default PHP types .