PHP Interface KamranAhmed\Smasher\Contracts\ResponseContract

Show file Open project: kamranahmedse/smasher

Public Methods

Method Description
decode ( string $response ) : array Decodes the passed string and creates array from it
encode ( array $data ) : string Formats the passed data for example a JsonResponse will encode to json, XMLResponse will encode to xml etc

Method Details

decode() public method

Decodes the passed string and creates array from it
public decode ( string $response ) : array
$response string The existing response which is to be decoded to array
return array

encode() public method

Formats the passed data for example a JsonResponse will encode to json, XMLResponse will encode to xml etc
public encode ( array $data ) : string
$data array The data which is to be encoded
return string