PHP Interface KamranAhmed\Smasher\Contracts\ResponseContract

Afficher le fichier Open project: kamranahmedse/smasher

Méthodes publiques

Méthode 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 méthode

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
Résultat array

encode() public méthode

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
Résultat string