Update of /cvsroot/phpweather/phpweather/output
In directory usw-pr-cvs1:/tmp/cvs-serv18576
Modified Files:
pw_text.php
Log Message:
new function to help customise it
Index: pw_text.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- pw_text.php 28 Mar 2002 21:18:29 -0000 1.8
+++ pw_text.php 29 Mar 2002 00:38:19 -0000 1.9
@@ -1126,6 +1126,24 @@
return gmdate('H:i \U\T\C', $data['time']);
}
+ /**
+ * Extract some value from the metar.
+ *
+ * @param array Data taken from decode_metar()
+ * @access public
+ */
+ function get_metar_value($index,$index2='',$index3='') {
+ // We use our own weather-object.
+ $data = $this->weather->decode_metar();
+ if ($index3){
+ return $data[$index][$index2][$index3];
+ } elseif ($index2) {
+ return $data[$index][$index2];
+ } else {
+ return $data[$index];
+ }
+ }
+
/**
* Makes a short weather-report in a table.
|