Overview

Namespaces

  • None
  • WPGMZA
    • Integration
    • Selector

Classes

  • AutoLoader
  • Crud
  • DOMDocument
  • DOMElement
  • Factory
  • GDPRCompliance
  • GoogleGeocoder
  • GoogleMap
  • GoogleMapsAPILoader
  • GoogleMapsLoader
  • LatLng
  • Map
  • MapsEngineDialog
  • Marker
  • ModalDialog
  • NominatimGeocodeCache
  • OLLoader
  • Plugin
  • RestAPI
  • ScriptLoader
  • Strings

Functions

  • create_marker_instance_delegate
  • create_plugin_instance
  • query_nominatim_cache
  • store_nominatim_cache
  • Overview
  • Namespace
  • Class

Class Marker

This class represents a marker

WPGMZA\Crud implements IteratorAggregate, JsonSerializable
Extended by WPGMZA\Marker implements JsonSerializable
Namespace: WPGMZA
Located at class.marker.php
Methods summary
public
# __construct( integer|array|object $id_or_fields = -1 )

Constructor

Constructor

Parameters

$id_or_fields
integer ID to read a marker, or an array or object to read data from to create a new one. If this argument is not specified, a new marker will be created.

Overrides

WPGMZA\Crud::__construct()
public static
# create_instance( $id_or_fields = -1 )

Deprecated. The Factory class will take over this functionality

Deprecated. The Factory class will take over this functionality

Deprecated

public array
# jsonSerialize( )

Returns a clone of this marker for JSON serialization. Unsets latlng binary spatial data which corrupts JSON, and sets custom field data.

Returns a clone of this marker for JSON serialization. Unsets latlng binary spatial data which corrupts JSON, and sets custom field data.

Returns

array
A JSON representation of this marker, without spatial data and with custom field ata.

Throws

Exception

Overrides

WPGMZA\Crud::jsonSerialize()

Implementation of

JsonSerializable::jsonSerialize()
protected string
# get_placeholder_by_type( string $type )

Overrides Crud::get_placeholder_by_type to correctly handle inserting and updating spatial data placeholders.

Overrides Crud::get_placeholder_by_type to correctly handle inserting and updating spatial data placeholders.

Parameters

$type
The column type

Returns

string
If ths column type is point, the correct text-to-spatial function and placeholder. Otherwise, falls back to the default.

Overrides

WPGMZA\Crud::get_placeholder_by_type()
protected string
# get_column_parameter( string $name )

Overrides Crud::get_column_parameter to correctly handle inserting and updating spatial data values.

Overrides Crud::get_column_parameter to correctly handle inserting and updating spatial data values.

Parameters

$name
The colum name

Returns

string
If ths column name is latlng, the POINT function with this markers latitude and longitude. Otherwise, falls back to the default.

Overrides

WPGMZA\Crud::get_column_parameter()
protected string
# get_arbitrary_data_column_name( )

Returns "other_data", which is the name of the column used to store arbitrary data on thet marker table.

Returns "other_data", which is the name of the column used to store arbitrary data on thet marker table.

Returns

string
Always other_data for the marker table.

Overrides

WPGMZA\Crud::get_arbitrary_data_column_name()
protected
# update_latlng( )

Called to update the latlng column for this marker in the database, when any changes are made to this objects properties lat, lng or latlng.

Called to update the latlng column for this marker in the database, when any changes are made to this objects properties lat, lng or latlng.

public
# __set( string $name, mixed $value )

Sets the named property, calling update_latlng where needed.

Sets the named property, calling update_latlng where needed.

Parameters

$name
The property name
$value
The value to set on the specified property

Throws

Exception
The object has been trashed
Exception
The specified property is read-only

Overrides

WPGMZA\Crud::__set()
Methods inherited from WPGMZA\Crud
__get(), __isset(), __unset(), assert_not_trashed(), column_exists(), create(), getIterator(), get_column_names(), get_column_parameters(), get_column_placeholders(), get_column_type(), get_columns(), get_table_name(), is_read_only(), parse_arbitrary_data(), read(), set(), store_arbitrary_data(), trash(), update()
Constants inherited from WPGMZA\Crud
BULK_READ
Properties summary
protected $custom_fields
#
API documentation generated by ApiGen