Oihana PHP System

SetGeoCoordinatesTrait

Injects the geo coordinates of a place from flat property expressions.

Each flat key — geoLatitude, geoLongitude, geoDistance, geoElevation — is written into the geo property of the consumer class, creating a GeoCoordinates on first use. A non-numeric value clears the matching field instead.

The consumer class must therefore declare geo ; every place in this library inherits it from PlaceTrait.

Tags
author

Marc Alcaraz (eKameleon)

since
1.3.0

Table of Contents

Methods

setGeoCoordinatesProperties()  : bool
Set the GeoCoordinates properties.
setGeoCoordinatesProperty()  : bool
Internal method to inject custom properties in the PostalAddress property of the place.

Methods

setGeoCoordinatesProperties()

Set the GeoCoordinates properties.

public setGeoCoordinatesProperties(string $property, mixed $value) : bool
Parameters
$property : string

The property to inject.

$value : mixed

The value of the property.

Return values
bool

setGeoCoordinatesProperty()

Internal method to inject custom properties in the PostalAddress property of the place.

public setGeoCoordinatesProperty(string $name, mixed $value) : bool
Parameters
$name : string

The name of the property to transform.

$value : mixed

The value of the property.

Return values
bool
On this page

Search results