ViaCEP
in package
Table of Contents
- $http : Client
- HTTP client.
- __construct() : mixed
- Creta a new ZipCode class instance.
- findByStreetName() : array<string|int, Address>
- Find addresses by state, city and street name.
- findByZipCode() : Address
- Find address by zip code (CEP).
Properties
$http
HTTP client.
protected
Client
$http
Methods
__construct()
Creta a new ZipCode class instance.
public
__construct([ClientInterface|null $http = null ]) : mixed
Parameters
- $http : ClientInterface|null = null
Return values
mixed —findByStreetName()
Find addresses by state, city and street name.
public
findByStreetName(string $state, string $city, string $street) : array<string|int, Address>
Parameters
- $state : string
- $city : string
- $street : string
Tags
Return values
array<string|int, Address> —findByZipCode()
Find address by zip code (CEP).
public
findByZipCode(string $zipCode) : Address
Parameters
- $zipCode : string