Class Marker
This class represents a marker
-
WPGMZA\Crud
implements
IteratorAggregate,
JsonSerializable
-
WPGMZA\Marker
implements
JsonSerializable
Methods summary
public
|
#
__construct( integer|array|object $id_or_fields = -1 )
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
|
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
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
Returns
string If ths column type is point, the correct text-to-spatial function and placeholder. Otherwise, falls back to the default.
Overrides
|
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
Returns
string If ths column name is latlng, the POINT function with this markers latitude and longitude. Otherwise, falls back to the default.
Overrides
|
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
|
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
|
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()
|