Moodle  2.2.1
http://www.collinsharper.com
Net_GeoIP_Location Class Reference

Public Member Functions

 distance (Net_GeoIP_Location $loc)
 serialize ()
 unserialize ($serialized)
 set ($name, $val)
 __set ($name, $val)
 getData ()
 __get ($name)
 __toString ()
 __isset ($name)

Protected Attributes

 $aData

Detailed Description

Definition at line 50 of file Location.php.


Member Function Documentation

__get ( name)

Magic method to get value from $this->aData array

Parameters:
string$nameThe var to get
Returns:
mixed string if value exists or null if it is empty of just does not exist

Definition at line 166 of file Location.php.

Here is the caller graph for this function:

__isset ( name)

Magic method makes it possible to check if specific record exists and also makes it possible to use empty() on any property

Parameters:
strign$nameThe name of the var to check
Returns:
bool

Definition at line 196 of file Location.php.

Here is the call graph for this function:

__set ( name,
val 
)

Definition at line 142 of file Location.php.

String representation of the object

Returns:
string text and result of print_r of $this->aData array

Definition at line 181 of file Location.php.

Calculate the distance in km between two points.

Parameters:
Net_GeoIP_Location$locThe other point to which distance will be calculated.
Returns:
float The number of km between two points on the globe.

Definition at line 73 of file Location.php.

getData ( )

Getter for $this->aData array

Returns:
array

Definition at line 152 of file Location.php.

serialize ( )

magic method to make it possible to store this object in cache when automatic serialization is on Specifically it makes it possible to store this object in memcache

Returns:
array

Definition at line 107 of file Location.php.

set ( name,
val 
)

Setter for elements of $this->aData array

Parameters:
string$nameThe variable to set
string$valThe value
Returns:
object $this object

Definition at line 133 of file Location.php.

unserialize ( serialized)

unserialize a representation of the object

Parameters:
array$serializedThe serialized representation of the location
Returns:
void

Definition at line 119 of file Location.php.


Field Documentation

$aData [protected]
Initial value:
 array(
        'countryCode'  => null,
        'countryCode3' => null,
        'countryName'  => null,
        'region'       => null,
        'city'         => null,
        'postalCode'   => null,
        'latitude'     => null,
        'longitude'    => null,
        'areaCode'     => null,
        'dmaCode'      => null
    )

Definition at line 52 of file Location.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations