Public Method Details |
db_null |
|
public void db_null( array $input )
|
| |
This constructor does nothing besides calling the parent constructor.
|
| Parameter |
|
| array |
$input |
|
|
initial properties of the object |
|
| Returns |
void |
|
get_type |
|
public string get_type( )
|
| |
Gets the type of the database.
|
| Returns |
string The type of the database, 'null' in this case. |
|
connect |
|
public boolean connect( )
|
| |
Pretends to establish a connection to the database.
Like all the other methods of this database object, this doesn't do anything useful.
|
| Returns |
boolean Always returns true, so that other functions that depends on a connection to the database doesn't fail because of this. |
|
insert_metar |
|
public void insert_metar( string $station, string $metar, integer $timestamp )
|
| |
Pretends to insert a METAR into the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
|
|
|
| integer |
$timestamp |
|
|
standard UNIX timestamp. |
|
| Returns |
void |
| See Also |
update_metar() |
|
update_metar |
|
public void update_metar( string $station, string $metar, integer $timestamp )
|
| |
Pretends to update an existing METAR in the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
|
|
|
| integer |
$timestamp |
|
|
standard UNIX timestamp. |
|
| Returns |
void |
| See Also |
insert_metar() |
|
get_metar |
|
public string get_metar( string $station )
|
| |
Pretends to return a METAR form the database.
|
| Parameter |
|
| string |
$station |
|
|
ICAO of the station. |
|
| Returns |
string Since we don't have a database, we just return an empty string. |
|
lookup_icao |
|
public string lookup_icao( string $icao )
|
| |
Translates an ICAO into a station name
|
| Parameter |
|
| string |
$icao |
|
|
ICAO to translate. |
|
| Returns |
string The translated ICAO. |
|
get_countries |
|
public array get_countries( )
|
| |
Returns a list of available countries.
It uses the file PHPWEATHER_BASE_DIR/db/files/countries.php created by insert_stations().
|
| Returns |
array An associative array with the country-codes as the keys and the names of the countries as the values. |
|
get_icaos |
|
public array get_icaos( string $cc, string &$country )
|
| |
Returns an array of stations.
|
| Parameter |
|
|
|
| string |
&$country |
|
|
parameter is passed by reference. The name of the country that corresponds to the country-code is stored here. |
|
| Returns |
array An associative array with the ICAO as the key and the name of the station as the values. The name of the country is not added to the name of the station. |
|