|
|
|
File: /www/gimpster.com/php/phpweather/phpweather.php
PHP Weather - PHP Weather
phpweather
base_object | +-- db_layer | +-- data_retrieval | +-- metar_parser | +-- phpweather
A container-class for the localized object.
|
private class phpweather extends metar_parser
A container-class for the localized object.
This class creates a member-object called output. It manages the language of the output.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fields inherited from db_layer |
| $db |
|
|
|
Private Field Summary |
| object locale_en |
$outputThe localized output-object |
|
Public Method Details |
phpweather |
|
public void phpweather( array $input )
|
| |
This constructor sets the language when the object is created.
|
| Parameter |
|
| array |
$input |
|
|
initial properties of the object. |
|
| Returns |
void |
|
set_language |
|
public void set_language( string $new_language )
|
| |
Sets the language.
The language is set by creating an object of the appropriate type, like 'locale_en' for English, 'locale_da' for Danish and so on.
|
| Parameter |
|
| string |
$new_language |
|
|
langauge-code for the language, like 'en' for English, 'fr' for French and so on. |
|
| Returns |
void |
|
get_language |
|
public string get_language( )
|
| |
Retuns the langauge.
|
| Returns |
string The langauge used by the object. |
|
print_pretty |
|
public string print_pretty( )
|
| |
Calls the print_pretty() function of the output-object.
If the METAR is not parsed, then it calls decode_metar() first, before it passes the decoded METAR to the print_pretty() function of the output-object.
|
| Returns |
string The pretty-printed weather-report. |
|
print_table |
|
public string print_table( )
|
| |
Calls the print_table() function of the output-object.
If the METAR is not parsed, then it calls decode_metar() first, before it passes the decoded METAR to the print_table() function of the output-object.
|
| Returns |
string The table-printed weather-report. |
|
|
Private Field Details |
$output |
|
private object locale_en $output
>><<
The localized output-object
|
|
|
|
|
|
| PHPDoc 1.0beta |