Location
class Location implements LocationInterface
Properties
protected Coordinates|null | $coordinates | ||
protected Bounds|null | $bounds | ||
protected string|int|null | $streetNumber | ||
protected string|null | $streetName | ||
protected string|null | $subLocality | ||
protected string|null | $locality | ||
protected string|null | $postalCode | ||
protected AdminLevelCollection | $adminLevels | ||
protected string|null | $countryName | ||
protected string|null | $countryCode | ||
protected string|null | $formattedAddress | ||
protected string|null | $timezone | ||
protected string | $providedBy | ||
protected | $data |
Methods
No description
Create an Address with an array.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Will always return the coordinates value object.
Returns the street number value.
Returns the street name value.
Returns the city or locality value.
Returns the postal code or zipcode value.
Returns the locality district, or sublocality, or neighborhood.
Returns the administrative levels.
Returns the country name.
Returns the country code.
Returns the timezone for the Location. The timezone MUST be in the list of supported timezones.
No description
Returns an array with data indexed by name.
No description
No description
No description
No description
No description
Details
at line 82
__construct(string $providedBy, array $data = [])
No description
at line 95
static Location
createFromArray(array $data)
Create an Address with an array.
at line 100
isValid()
No description
at line 105
format(string $mapping = '%n %S %L %z')
No description
at line 113
null|string
getFormattedAddress()
No description
at line 123
Location
withFormattedAddress(string $formattedAddress = null)
No description
at line 139
Location
setBounds(float $south, float $west, float $north, float $east)
No description
at line 157
Location
setCoordinates(float $latitude, float $longitude)
No description
at line 176
Location
addAdminLevel(int $level, string $name, string $code = null)
No description
at line 188
Location
setStreetNumber(null|string $streetNumber)
No description
at line 200
Location
setStreetName(null|string $streetName)
No description
at line 212
Location
setLocality(null|string $locality)
No description
at line 224
Location
setPostalCode(null|string $postalCode)
No description
at line 236
Location
setSubLocality(null|string $subLocality)
No description
at line 248
Location
setAdminLevels(array $adminLevels)
No description
at line 260
Location
setCountryName(null|string $countryName)
No description
at line 272
Location
setCountryCode(null|string $countryCode)
No description
at line 284
Location
setTimezone(null|string $timezone)
No description
at line 297
Location
setValue(string $name, mixed $value)
No description
at line 310
mixed
getValue(string $name, mixed|null $default = null)
No description
at line 324
bool
hasValue(string $name)
No description
at line 332
string
getProvidedBy()
No description
at line 340
Coordinates|null
getCoordinates()
Will always return the coordinates value object.
at line 348
Bounds|null
getBounds()
Returns the bounds value object.
at line 356
string|int|null
getStreetNumber()
Returns the street number value.
at line 364
string|null
getStreetName()
Returns the street name value.
at line 372
string|null
getLocality()
Returns the city or locality value.
at line 380
string|null
getPostalCode()
Returns the postal code or zipcode value.
at line 388
string|null
getSubLocality()
Returns the locality district, or sublocality, or neighborhood.
at line 396
AdminLevelCollection
getAdminLevels()
Returns the administrative levels.
This method MUST NOT return null.
at line 404
string|null
getCountryName()
Returns the country name.
at line 412
string|null
getCountryCode()
Returns the country code.
at line 420
string|null
getTimezone()
Returns the timezone for the Location. The timezone MUST be in the list of supported timezones.
at line 425
hasCoordinates()
No description
at line 438
array
toArray()
Returns an array with data indexed by name.
at line 474
protected
fillFromData(array $data)
No description
at line 496
protected Coordinates|null
createCoordinates($data)
No description
at line 512
protected Bounds|null
createBounds($data)
No description
at line 523
protected array
mergeWithDefaults(array $data)
No description
at line 549
protected
makeAdminLevels(array $data)
No description