PHP Class Geo_Location

Inheritance: extends DatabaseObject, implements IGeoLocation
Show file Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_columnNames array
$m_dbTableName string
$m_keyColumnNames array
$m_keyIsAutoIncrement boolean

Public Methods

Method Description
FindLocation ( array $p_location, string $p_type, integer $p_style, array $p_center, integer $p_radius ) : integer Looks whether the location is llready at the database NOTE: the 'location' ('center') parameters should be array with points (a point) with lat/lon values
UpdateContents ( integer $p_mapId, array $p_contents ) : boolean Updates the point text content, the COW way
UpdateIcon ( array $poi ) : void Updates the point marker icon file name
UpdateLocations ( integer $p_mapId, array $p_locations ) : boolean Updates the location, the COW way
UpdateOrder ( integer $p_mapId, array $p_reorder, array $p_indices ) : boolean Updates the point ordering at the map NB: p_indices are used for the newly inserted points from the ajax request
__construct ( mixed $arg = NULL, $p_forceExists = false )
fetch ( $arg = null, $p_forceExists = false ) : boolean Fetch a single record from the database for the given key.
getId ( ) : integer
getLastModified ( ) : timestamp
getLatitude ( ) : float Get latitude
getLongitude ( ) : float Get longitude
getPOICenter ( )
getPOILocation ( )
getPOIRadius ( ) : double
getPOIType ( ) : string
getPOITypeStyle ( )
getUserId ( ) : integer

Method Details

FindLocation() public static method

Looks whether the location is llready at the database NOTE: the 'location' ('center') parameters should be array with points (a point) with lat/lon values
public static FindLocation ( array $p_location, string $p_type, integer $p_style, array $p_center, integer $p_radius ) : integer
$p_location array
$p_type string
$p_style integer
$p_center array
$p_radius integer
return integer

UpdateContents() public static method

Updates the point text content, the COW way
public static UpdateContents ( integer $p_mapId, array $p_contents ) : boolean
$p_mapId integer
$p_contents array
return boolean

UpdateIcon() public static method

Updates the point marker icon file name
public static UpdateIcon ( array $poi ) : void
$poi array
return void

UpdateLocations() public static method

Updates the location, the COW way
public static UpdateLocations ( integer $p_mapId, array $p_locations ) : boolean
$p_mapId integer
$p_locations array
return boolean

UpdateOrder() public static method

Updates the point ordering at the map NB: p_indices are used for the newly inserted points from the ajax request
public static UpdateOrder ( integer $p_mapId, array $p_reorder, array $p_indices ) : boolean
$p_mapId integer
$p_reorder array
$p_indices array
return boolean

__construct() public method

public __construct ( mixed $arg = NULL, $p_forceExists = false )
$arg mixed

fetch() public method

Fetch a single record from the database for the given key.
public fetch ( $arg = null, $p_forceExists = false ) : boolean
return boolean TRUE on success, FALSE on failure

getId() public method

public getId ( ) : integer
return integer

getLastModified() public method

public getLastModified ( ) : timestamp
return timestamp

getLatitude() public method

Get latitude
public getLatitude ( ) : float
return float

getLongitude() public method

Get longitude
public getLongitude ( ) : float
return float

getPOICenter() public method

public getPOICenter ( )

getPOILocation() public method

public getPOILocation ( )

getPOIRadius() public method

public getPOIRadius ( ) : double
return double

getPOIType() public method

public getPOIType ( ) : string
return string

getPOITypeStyle() public method

public getPOITypeStyle ( )

getUserId() public method

public getUserId ( ) : integer
return integer

Property Details

$m_columnNames public property

public array $m_columnNames
return array

$m_dbTableName public property

public string $m_dbTableName
return string

$m_keyColumnNames public property

public array $m_keyColumnNames
return array

$m_keyIsAutoIncrement public property

public bool $m_keyIsAutoIncrement
return boolean