PHP Класс Geo_Map

Наследование: extends DatabaseObject, implements IGeoMap
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$m_columnNames array
$m_dbTableName string
$m_keyColumnNames array

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

Метод Описание
GetArticleMapId ( $p_articleObj ) : integer Gives map id of the article
GetGeoSearchSQLQuery ( array $p_coordinates ) : string Gives the SQL query for article searching via their point inside the box specified by the p_coordinates.
GetLocationsByArticle ( $p_articleObj ) : array Gives array of artilce's map's points: just point names (of the article object language) and usage flags.
GetMapByArticle ( integer $p_articleNumber ) : Geo_Map
GetMapFilterBody ( ) : string Gives the body map-placement part for the map filtering
GetMapFilterCenter ( ) : string Gives the body map-centering (js call) part for the map filtering
GetMapFilterHeader ( integer $p_mapWidth, integer $p_mapHeight ) : string Gives the header part for the map filtering
GetMapFilterObjName ( ) : string Gives the name of the javascript object used for the map filtering
GetMapId ( ) TODO: obsolete, use $this->getId() instead.
GetMapIdByArticle ( integer $p_articleNumber ) : integer
GetMapIdsByArticle ( $p_articleObj ) : array Gives array of article's maps, with usage flags.
GetMapSearchBody ( ) : string Gives the body map-placement part for the map front end search by map-based rectangle selection
GetMapSearchCenter ( ) : string Gives the body map-centering (js call) part for the map front end search by map-based rectangle selection
GetMapSearchHeader ( integer $p_mapWidth, integer $p_mapHeight, mixed $p_bboxDivs = null ) : string Gives the header part for the map front end search by map-based rectangle selection the optional p_bboxDivs array of divs for automatical setting of the box corners coordinates.
GetMapTagBody ( integer $p_articleNumber, integer $p_languageId, $p_largeMap = false ) : string Gives the body map-placement part for the map front end presentation
GetMapTagCenter ( integer $p_articleNumber, integer $p_languageId ) : string Gives the body map-centering (js call) part for the map front end presentation
GetMapTagHeader ( integer $p_articleNumber, integer $p_languageId, integer $p_mapWidth, integer $p_mapHeight, array $p_options = null ) : string Gives the header part for the map front end presentation
GetMapTagList ( integer $p_articleNumber, integer $p_languageId ) : string
GetMapTagListData ( integer $p_articleNumber, integer $p_languageId ) : array Gives the body map-info and point-list part for the map front end presentation
GetMapTagOpen ( integer $p_articleNumber, integer $p_languageId, $p_specifier = null ) : string Gives the body open-large-map link part for the article-map front end presentation
GetMultiMapTagBody ( integer $p_languageId, integer $p_rank, $p_largeMap = false ) : string Gives the body map-placement part for the map front end presentation
GetMultiMapTagCenter ( integer $p_languageId, $p_rank ) : string Gives the body map-centering (js call) part for the map front end presentation
GetMultiMapTagHeader ( integer $p_languageId, $p_constraints, array $p_options, integer $p_offset, integer $p_limit, integer $p_mapWidth, integer $p_mapHeight, integer $p_rank ) : string Gives the header part for the multi-map front end presentation
GetMultiMapTagList ( integer $p_languageId, array $p_constraints, array $p_options, string $p_label, integer $p_offset, integer $p_limit, integer $p_rank ) : string
GetMultiMapTagListData ( integer $p_languageId, array $p_constraints, array $p_options, integer $p_offset, integer $p_limit, integer $p_rank ) : array Gives the body map-info and point-list part for the map front end presentation
GetMultiMapTagOpen ( integer $p_languageId, integer $p_rank, $p_specifier = null ) : string Gives the body open-large-map link part for the multi-map front end presentation
InsertPoints ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, array $p_insertion, array &$p_indices ) : array Inserts points (with locations and other contents) into the map.
LoadMapData ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, $p_preview = false, $p_textOnly = false ) : array Load map data
OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber, array $p_copyTranslations, $p_userId = null ) : void Copy all the map-related pointers for the given article.
OnArticleDelete ( integer $p_articleNumber ) : void This is called when the (last language of the) article is deleted Remove map pointers to the given article.
OnCreateTranslation ( integer $p_articleNumber, integer $p_srcLanguageId, integer $p_destLanguageId ) : void Copy all the pointers for the given article.
OnLanguageDelete ( integer $p_articleNumber, integer $p_languageId ) : void This is called when a (non-last) language is deleted.
ReadLanguagesByArticle ( integer $p_articleNumber ) : array Gives languages used at the map's article
ReadLanguagesByMap ( integer $p_mapId ) : array Gives languages used at the map text contents
ReadMapId ( integer $p_articleNumber, integer $p_rank = 1 ) : integer Gives id of article's map id
ReadMapInfo ( string $p_type, integer $p_id ) : array Provides general information on a map, specified by map id or article number
ReadMultiMapInfo ( ) fn ReadMapInfo
RemovePoints ( integer $p_mapId, array $p_removal ) : boolean Removes points (with locations and other contents) from the map.
StoreMapData ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, mixed $p_map = '', mixed $p_remove = '', mixed $p_insert = '', mixed $p_locations = '', mixed $p_contents = '', mixed $p_order = '' ) : array The main dispatcher for ajax based editing of maps
UnlinkArticle ( $p_articleObj = null, $p_articleNumber ) : array Sets the article's map to be without an article link, to stay as a lone map.
UpdateMap ( integer &$p_mapId, integer $p_articleNumber, array $p_map ) : integer Updates the basic information on the map.
__construct ( integer $p_id = null ) : Map Constructor
delete ( ) : void Deletes the map with all its points, translations, and other associated data.
getArticleNumber ( ) : integer
getDimensions ( ) : array
getDisplayResolution ( ) : integer
getId ( ) : integer
getInitialCenterLatitude ( ) : double
getInitialCenterLongitude ( ) : double
getLastModified ( ) : timestamp
getLocations ( ) : array
getMapProvider ( ) : string
getName ( ) : string
getUser ( ) : User | null
isEnabled ( ) : boolean

Приватные методы

Метод Описание
GetLargeMapOpener ( string $p_mapSuffix, integer $p_widthLargeMap, integer $p_heightLargeMap, string $p_labelLargeMap, string $p_tagStringPrev, string $p_tagStringBody ) : string Gives the large map opener part of the header part for all the presentation maps

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

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

Gives map id of the article
public static GetArticleMapId ( $p_articleObj ) : integer
Результат integer

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

The (two) corner lon/lat coordinates should go west to east.
public static GetGeoSearchSQLQuery ( array $p_coordinates ) : string
$p_coordinates array
Результат string

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

Gives array of artilce's map's points: just point names (of the article object language) and usage flags.
public static GetLocationsByArticle ( $p_articleObj ) : array
Результат array

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

public static GetMapByArticle ( integer $p_articleNumber ) : Geo_Map
$p_articleNumber integer
Результат Geo_Map

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

Gives the body map-placement part for the map filtering
public static GetMapFilterBody ( ) : string
Результат string

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

Gives the body map-centering (js call) part for the map filtering
public static GetMapFilterCenter ( ) : string
Результат string

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

Gives the header part for the map filtering
public static GetMapFilterHeader ( integer $p_mapWidth, integer $p_mapHeight ) : string
$p_mapWidth integer
$p_mapHeight integer
Результат string

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

Gives the name of the javascript object used for the map filtering
public static GetMapFilterObjName ( ) : string
Результат string

GetMapId() публичный Метод

TODO: obsolete, use $this->getId() instead.
public GetMapId ( )

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

public static GetMapIdByArticle ( integer $p_articleNumber ) : integer
$p_articleNumber integer
Результат integer $map_id

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

Gives array of article's maps, with usage flags.
public static GetMapIdsByArticle ( $p_articleObj ) : array
Результат array

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

Gives the body map-placement part for the map front end search by map-based rectangle selection
public static GetMapSearchBody ( ) : string
Результат string

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

Gives the body map-centering (js call) part for the map front end search by map-based rectangle selection
public static GetMapSearchCenter ( ) : string
Результат string

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

The bounding-box corners are available by js calls too (see e.g. locations/search.php).
public static GetMapSearchHeader ( integer $p_mapWidth, integer $p_mapHeight, mixed $p_bboxDivs = null ) : string
$p_mapWidth integer
$p_mapHeight integer
$p_bboxDivs mixed
Результат string

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

Gives the body map-placement part for the map front end presentation
public static GetMapTagBody ( integer $p_articleNumber, integer $p_languageId, $p_largeMap = false ) : string
$p_articleNumber integer
$p_languageId integer
Результат string

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

Gives the body map-centering (js call) part for the map front end presentation
public static GetMapTagCenter ( integer $p_articleNumber, integer $p_languageId ) : string
$p_articleNumber integer
$p_languageId integer
Результат string

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

Gives the header part for the map front end presentation
public static GetMapTagHeader ( integer $p_articleNumber, integer $p_languageId, integer $p_mapWidth, integer $p_mapHeight, array $p_options = null ) : string
$p_articleNumber integer
$p_languageId integer
$p_mapWidth integer
$p_mapHeight integer
$p_options array
Результат string

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

public static GetMapTagList ( integer $p_articleNumber, integer $p_languageId ) : string
$p_articleNumber integer
$p_languageId integer
Результат string

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

Gives the body map-info and point-list part for the map front end presentation
public static GetMapTagListData ( integer $p_articleNumber, integer $p_languageId ) : array
$p_articleNumber integer
$p_languageId integer
Результат array

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

Gives the body open-large-map link part for the article-map front end presentation
public static GetMapTagOpen ( integer $p_articleNumber, integer $p_languageId, $p_specifier = null ) : string
$p_articleNumber integer
$p_languageId integer
Результат string

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

Gives the body map-placement part for the map front end presentation
public static GetMultiMapTagBody ( integer $p_languageId, integer $p_rank, $p_largeMap = false ) : string
$p_languageId integer
$p_rank integer The rank of the current multi-map, used to make unique ids
Результат string

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

Gives the body map-centering (js call) part for the map front end presentation
public static GetMultiMapTagCenter ( integer $p_languageId, $p_rank ) : string
$p_languageId integer
Результат string

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

Gives the header part for the multi-map front end presentation
public static GetMultiMapTagHeader ( integer $p_languageId, $p_constraints, array $p_options, integer $p_offset, integer $p_limit, integer $p_mapWidth, integer $p_mapHeight, integer $p_rank ) : string
$p_languageId integer
$p_options array
$p_offset integer
$p_limit integer
$p_mapWidth integer
$p_mapHeight integer
$p_rank integer The rank of the current multi-map, used to make unique ids
Результат string

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

public static GetMultiMapTagList ( integer $p_languageId, array $p_constraints, array $p_options, string $p_label, integer $p_offset, integer $p_limit, integer $p_rank ) : string
$p_languageId integer
$p_constraints array
$p_options array
$p_label string
$p_offset integer
$p_limit integer
$p_rank integer The rank of the current multi-map, used to make unique ids
Результат string

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

Gives the body map-info and point-list part for the map front end presentation
public static GetMultiMapTagListData ( integer $p_languageId, array $p_constraints, array $p_options, integer $p_offset, integer $p_limit, integer $p_rank ) : array
$p_languageId integer
$p_constraints array
$p_options array
$p_offset integer
$p_limit integer
$p_rank integer The rank of the current multi-map, used to make unique ids
Результат array

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

Gives the body open-large-map link part for the multi-map front end presentation
public static GetMultiMapTagOpen ( integer $p_languageId, integer $p_rank, $p_specifier = null ) : string
$p_languageId integer
$p_rank integer The rank of the current multi-map, used to make unique ids
Результат string

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

NB: The result indices are used at the point order updating, since that order-updating would not know id's of the new points otherwise.
public static InsertPoints ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, array $p_insertion, array &$p_indices ) : array
$p_mapId integer
$p_languageId integer
$p_articleNumber integer
$p_insertion array
$p_indices array
Результат array

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

Load map data
public static LoadMapData ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, $p_preview = false, $p_textOnly = false ) : array
$p_mapId integer
$p_languageId integer
$p_articleNumber integer
Результат array

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

- read and copy all links / basic data on: - maps (Map table) with links into the given src article, set link into dest art no. - points (MapLocation table) with links into read map ids, set link into new map ids - text contents (MapLocationLanguages table) with links into read maploc ids and into the given languages - multimedia (MapLocationMultimedia table) with links into read maploc ids
public static OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber, array $p_copyTranslations, $p_userId = null ) : void
$p_srcArticleNumber integer
$p_destArticleNumber integer
$p_copyTranslations array
Результат void

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

After article removal (with all its languages), the map is preserved with just the last language.
public static OnArticleDelete ( integer $p_articleNumber ) : void
$p_articleNumber integer
Результат void

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

Copy all the pointers for the given article.
public static OnCreateTranslation ( integer $p_articleNumber, integer $p_srcLanguageId, integer $p_destLanguageId ) : void
$p_articleNumber integer
$p_srcLanguageId integer
$p_destLanguageId integer
Результат void

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

It will remove the links on location contents, and the possible free contents. Finally left maps are just with the last language (that is not processed herein).
public static OnLanguageDelete ( integer $p_articleNumber, integer $p_languageId ) : void
$p_articleNumber integer
$p_languageId integer
Результат void

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

Gives languages used at the map's article
public static ReadLanguagesByArticle ( integer $p_articleNumber ) : array
$p_articleNumber integer
Результат array

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

Gives languages used at the map text contents
public static ReadLanguagesByMap ( integer $p_mapId ) : array
$p_mapId integer
Результат array

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

Gives id of article's map id
public static ReadMapId ( integer $p_articleNumber, integer $p_rank = 1 ) : integer
$p_articleNumber integer
$p_rank integer
Результат integer

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

Provides general information on a map, specified by map id or article number
public static ReadMapInfo ( string $p_type, integer $p_id ) : array
$p_type string
$p_id integer
Результат array

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

fn ReadMapInfo
public static ReadMultiMapInfo ( )

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

Removes points (with locations and other contents) from the map.
public static RemovePoints ( integer $p_mapId, array $p_removal ) : boolean
$p_mapId integer
$p_removal array
Результат boolean

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

The main dispatcher for ajax based editing of maps
public static StoreMapData ( integer $p_mapId, integer $p_languageId, integer $p_articleNumber, mixed $p_map = '', mixed $p_remove = '', mixed $p_insert = '', mixed $p_locations = '', mixed $p_contents = '', mixed $p_order = '' ) : array
$p_mapId integer
$p_languageId integer
$p_articleNumber integer
$p_map mixed
$p_remove mixed
$p_insert mixed
$p_locations mixed
$p_contents mixed
$p_order mixed
Результат array

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

Sets the article's map to be without an article link, to stay as a lone map.
public static UnlinkArticle ( $p_articleObj = null, $p_articleNumber ) : array
Результат array

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

If the p_mapId is not set, a new map is created (and the p_mapId is set then) on the p_articleNumber article.
public static UpdateMap ( integer &$p_mapId, integer $p_articleNumber, array $p_map ) : integer
$p_mapId integer
$p_articleNumber integer
$p_map array
Результат integer

__construct() публичный Метод

Constructor
public __construct ( integer $p_id = null ) : Map
$p_id integer
Результат Map

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

This does real removals, unlike the OnArticleDelete/UnlinkArticle methods.
public delete ( ) : void
Результат void

getArticleNumber() публичный Метод

public getArticleNumber ( ) : integer
Результат integer

getDimensions() публичный Метод

public getDimensions ( ) : array
Результат array

getDisplayResolution() публичный Метод

public getDisplayResolution ( ) : integer
Результат integer

getId() публичный Метод

public getId ( ) : integer
Результат integer

getInitialCenterLatitude() публичный Метод

public getInitialCenterLatitude ( ) : double
Результат double

getInitialCenterLongitude() публичный Метод

public getInitialCenterLongitude ( ) : double
Результат double

getLastModified() публичный Метод

public getLastModified ( ) : timestamp
Результат timestamp

getLocations() публичный Метод

public getLocations ( ) : array
Результат array of IGeoMapLocation

getMapProvider() публичный Метод

public getMapProvider ( ) : string
Результат string

getName() публичный Метод

public getName ( ) : string
Результат string

getUser() публичный Метод

public getUser ( ) : User | null
Результат User | null

isEnabled() публичный Метод

public isEnabled ( ) : boolean
Результат boolean

Описание свойств

$m_columnNames публичное свойство

public array $m_columnNames
Результат array

$m_dbTableName публичное свойство

public string $m_dbTableName
Результат string

$m_keyColumnNames публичное свойство

public array $m_keyColumnNames
Результат array