Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv16712
Modified Files:
phpweather.php
Log Message:
Rearranging comments.
Index: phpweather.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- phpweather.php 2001/07/05 16:05:11 1.10
+++ phpweather.php 2001/07/08 19:50:09 1.11
@@ -14,7 +14,8 @@
/**
* A container-class for the localized object.
*
- * This class creates a member-object called output. It manages the language of the
output.
+ * This class creates a member-object called output.
+ * It manages the language of the output.
*
* @author Martin Geisler <[EMAIL PROTECTED]>
* @version $Id$
@@ -22,7 +23,7 @@
class phpweather extends metar_parser {
/**
- * The localized output-object
+ * The localized output-object.
*
* @var object locale_en
*/
@@ -35,10 +36,10 @@
* @access public
*/
function phpweather($input) {
- /* We call the parent constructor. */
+ /* We call the parent constructor. */
$this->metar_parser($input);
- /* We also set the language. */
+ /* We also set the language. */
$this->set_language($this->properties['language']);
}
@@ -46,11 +47,15 @@
/**
* 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.
+ * The language is set by creating an object of the appropriate type,
+ * like 'locale_en' for English, 'locale_da' for Danish and so on.
*
- * @param string The langauge-code for the language, like 'en' for English, 'fr'
for French and so on.
+ * @param string The langauge-code for the language, like 'en' for
+ * English, 'fr' for French and so on.
+ *
* @access public
*/
+
function set_language($new_language) {
switch ($new_language) {
case 'en':
@@ -73,21 +78,25 @@
}
/**
- * Retuns the langauge.
+ * Returns the language.
*
- * @return string The langauge used by the object.
+ * @return string The language used by the object.
* @access public
*/
+
function get_language() {
return $this->properties['language'];
}
/**
* Returns a list of languages.
+ *
+ * @return array An associative array with the language codes as the
+ * keys and the names of the languages as the values.
*
- * @return array An associative array with the language codes as the keys and the
names of the languages as the values.
* @access public
*/
+
function get_languages() {
require(PHPWEATHER_BASE_DIR . '/locales/languages.php');
$dir = opendir(PHPWEATHER_BASE_DIR . '/locales');
@@ -104,11 +113,14 @@
/**
* 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.
+ * 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.
*
- * @return string The pretty-printed weather-report.
+ * @return string The pretty-printed weather-report.
* @access public
*/
+
function print_pretty() {
if (empty($this->decoded_metar)) {
$this->decode_metar();
@@ -119,17 +131,19 @@
/**
* 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.
+ * 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.
*
* @return string The table-printed weather-report.
* @access public
*/
+
function print_table() {
if (empty($this->decoded_metar)) {
$this->decode_metar();
}
return $this->output->print_table($this->decoded_metar);
}
-
}
_______________________________________________
PHPWeather-checkins mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/phpweather-checkins