PHP Класс Backend\Modules\Location\Engine\Model

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
delete ( integer $id ) Delete an item
exists ( integer $id ) : boolean Check if an item exists
get ( integer $id ) : array Fetch a record from the database
getAll ( ) : array Fetch a record from the database
getCoordinates ( string $street = null, string $streetNumber = null, string $city = null, string $zip = null, string $country = null ) : array Get coordinates latitude/longitude
getMapSetting ( integer $mapId, string $name ) : mixed Retrieve a map setting
getMapSettings ( integer $mapId ) : array Fetch all the settings for a specific map
insert ( array $item ) : integer Insert an item
setMapSetting ( integer $mapId, string $key, mixed $value ) Save the map settings
update ( array $item ) : integer Update an item

Описание методов

delete() публичный статический Метод

Delete an item
public static delete ( integer $id )
$id integer The id of the record to delete.

exists() публичный статический Метод

Check if an item exists
public static exists ( integer $id ) : boolean
$id integer The id of the record to look for.
Результат boolean

get() публичный статический Метод

Fetch a record from the database
public static get ( integer $id ) : array
$id integer The id of the record to fetch.
Результат array

getAll() публичный статический Метод

Fetch a record from the database
public static getAll ( ) : array
Результат array

getCoordinates() публичный статический Метод

Get coordinates latitude/longitude
public static getCoordinates ( string $street = null, string $streetNumber = null, string $city = null, string $zip = null, string $country = null ) : array
$street string
$streetNumber string
$city string
$zip string
$country string
Результат array Contains 'latitude' and 'longitude' as variables

getMapSetting() публичный статический Метод

Retrieve a map setting
public static getMapSetting ( integer $mapId, string $name ) : mixed
$mapId integer
$name string
Результат mixed

getMapSettings() публичный статический Метод

Fetch all the settings for a specific map
public static getMapSettings ( integer $mapId ) : array
$mapId integer
Результат array

insert() публичный статический Метод

Insert an item
public static insert ( array $item ) : integer
$item array The data of the record to insert.
Результат integer

setMapSetting() публичный статический Метод

Save the map settings
public static setMapSetting ( integer $mapId, string $key, mixed $value )
$mapId integer
$key string
$value mixed

update() публичный статический Метод

Update an item
public static update ( array $item ) : integer
$item array The data of the record to update.
Результат integer