Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv30507
Modified Files:
base_object.php db_none.php locale_common.php
Log Message:
Even more doc-changes.
Index: base_object.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/base_object.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- base_object.php 2001/03/24 20:27:27 1.2
+++ base_object.php 2001/03/26 20:18:26 1.3
@@ -6,31 +6,31 @@
* get a set of standard methods to generate messenges. You can make
* error-messages, notices and print debug-information.
*
- * @author Martin Geisler <[EMAIL PROTECTED]>
- * @version $Id$
- * @package PHP Weather
+ * @author Martin Geisler <[EMAIL PROTECTED]>
+ * @version $Id$
+ * @package PHP Weather
*/
class base_object {
/**
* All the objects properties are stored in this array.
*
- * @var array
- * @see $defaults
+ * @var array
+ * @see $defaults
*/
var $properties = array();
/**
* Classes that extend this one, should put their defaults into this array.
*
- * @var array
+ * @var array
*/
var $defaults = array();
/**
* Sets up the properties by overriding the defaults with the actual input.
*
- * @param $input array the initial properties of the object
- * @see $properties, $defaults
+ * @param $input array the initial properties of the object
+ * @see $properties, $defaults
*/
function base_object($input) {
@@ -50,7 +50,7 @@
* You should supply it with a string as the argument, and it will
* then print the string, prefixed with the word 'Error' in bold.
*
- * @param $msg string The error-message.
+ * @param $msg string The error-message.
*/
function error($msg) {
if ('DEBUG') {
@@ -64,7 +64,7 @@
* You should supply it with a string as the argument, and it will
* then print the string, prefixed with the word 'Notice' in bold.
*
- * @param $msg string The notice.
+ * @param $msg string The notice.
*/
function notice($msg) {
if (defined('DEBUG')) {
Index: db_none.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_none.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -3 -r1.1.1.1 -r1.2
--- db_none.php 2001/03/22 18:04:09 1.1.1.1
+++ db_none.php 2001/03/26 20:18:26 1.2
@@ -4,15 +4,15 @@
*
* It pretends to be a database, but really it isn't :-) It just implements all the
functions one would expect from a database, and then returns true or false or with
empty strings and arrays as appropriate.
*
- * @author Martin Geisler <[EMAIL PROTECTED]>
- * @version $Id$
+ * @author Martin Geisler <[EMAIL PROTECTED]>
+ * @version $Id$
*/
class db_none extends db_common {
/**
* This constructor does nothing besides calling the parent constructor.
*
- * @param array the initial properties of the object
+ * @param array the initial properties of the object
*/
function db_none($input) {
$this->db_common($input);
@@ -21,8 +21,8 @@
/**
* Gets the type of the database.
*
- * @return string The type of the database, 'none' in this case.
- * @access public
+ * @return string The type of the database, 'none' in this case.
+ * @access public
*/
function get_type() {
return 'none';
Index: locale_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/locale_common.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- locale_common.php 2001/03/24 15:59:21 1.2
+++ locale_common.php 2001/03/26 20:18:26 1.3
@@ -4,8 +4,8 @@
*
* This class has the capability to do an English pretty-print, if it is provided
with the right set of strings. It's up to child-classes to provide these strings, and
override the methods in this class, as necessary.
*
- * @author Martin Geisler <[EMAIL PROTECTED]>
- * @version $Id$
+ * @author Martin Geisler <[EMAIL PROTECTED]>
+ * @version $Id$
*/
class locale_common extends base_object {
@@ -14,7 +14,7 @@
*
* Each string is identified by it's key in the array. Some strings are used
between the dynamic parts, and others are used as format-strings to sprintf().
*
- * @var array $strings
+ * @var array $strings
*/
var $strings = array();
@@ -27,8 +27,8 @@
* - 'mark_end' = '</b>'
* - 'exclude' = array()
*
- * @param array The initial properties of the object.
- * @access public
+ * @param array The initial properties of the object. If you omit some
+properties, the defaults should kick-in.
+ * @access public
*/
function locale_common($input) {
/* First we extend the defaults values. */
@@ -44,10 +44,10 @@
/**
* Sets the marks (the strings inserted before and after every number)
*
- * @param string The mark used before numbers, for example '<font color="red">'
- * @param string The mark used after numbers, for example '</font>'
- * @access public
- * @see get_marks()
+ * @param string The mark used before numbers and other data elements, for
+example '<font color="red">'
+ * @param string The mark used after numbers and other data elements, for
+example '</font>'. If you use HTML tags, it's your responsibility to ensure that they
+match up.
+ * @access public
+ * @see get_marks()
*/
function set_marks($new_mark_begin, $new_mark_end) {
$this->properties['mark_begin'] = $new_mark_begin;
@@ -57,7 +57,7 @@
/**
* Gets the marks
*
- * @return array The first element is used before any number, and the second
element is used after.
+ * @return array The first element is the string inserted before any number,
+and the second element is the string inserted after.
* @access public
* @see set_marks()
*/
@@ -74,9 +74,9 @@
* - 'only_metric' if one wants to produce output like this '10 kilometers'
* - 'only_imperial' if one wants to produce output like this '16.1 miles'
*
- * @param string The new kind of units one wants to use.
- * @access public
- * @see get_pref_units()
+ * @param string The new kind of units one wants to use.
+ * @access public
+ * @see get_pref_units()
*/
function set_pref_units($new_pref_units) {
switch ($new_pref_units) {
@@ -97,9 +97,9 @@
/**
* Gets the preferred units.
*
- * @return string The preferred kind of units.
- * @access public
- * @see set_pref_units()
+ * @return string The preferred kind of units. This will be one of 'both_metric',
+'both_imperial', 'only_metric' or 'only_imperial'.
+ * @access public
+ * @see set_pref_units()
*/
function get_pref_units() {
return $this->properties['pref_units'];
@@ -109,9 +109,9 @@
/**
* Used to specify which elements one wants to exclude from the pretty-print.
*
- * @param array The array should contain the names of the sections one doesn't
want to have displayed, like 'wind' or 'time' if one wants to skip the wind or
time-parts of the pretty-print.
- * @access public
- * @see get_exclude()
+ * @param array The array should contain the names of the sections one doesn't
+want to have displayed, like 'wind' or 'time' if one wants to skip the wind or time
+parts of the pretty-print.
+ * @access public
+ * @see get_exclude()
*/
function set_exclude($new_exclude) {
if (is_array($new_exclude)) {
@@ -124,9 +124,9 @@
/**
* Gets the array of excluded elements of the pretty-print.
*
- * @return array The excluded elements.
- * @access public
- * @see set_exclude()
+ * @return array The excluded elements.
+ * @access public
+ * @see set_exclude()
*/
function get_exclude() {
return $this->properties['exclude'];
@@ -136,11 +136,11 @@
/**
* Used to format strings with regard to the preferred units.
*
- * @param string This string should always contain the metric value.
- * @param string This string should always contain the imperial value.
- * @return string The two arguments in the correct order with regard to the
preferred units.
- * @see set_pref_units()
- * @access private
+ * @param string This string should always contain the metric value.
+ * @param string This string should always contain the imperial value.
+ * @return string The two arguments in the correct order with regard to the
+preferred units.
+ * @see set_pref_units()
+ * @access private
*/
function pref_units($str1, $str2) {
switch ($this->properties['pref_units']) {
@@ -174,8 +174,8 @@
* - $strings['list_sentences_final_and']
* Only non-empty arguments are used, so it's safe to call this function with empty
strings.
*
- * @access private
- * @return string The arguments put together.
+ * @access private
+ * @return string The arguments put together.
*/
function list_sentences () {
$num_args = func_num_args();
@@ -216,10 +216,10 @@
/**
* Used to parse precipitation.
*
- * @param integer The amount of precipitation measured in inches.
- * @param integer The amount of precipitation measured in millimeter's.
- * @access private
- * @return string A formatted string with information about the precipitation.
+ * @param integer The amount of precipitation measured in inches.
+ * @param integer The amount of precipitation measured in millimeters.
+ * @access private
+ * @return string A formatted string with information about the precipitation.
*/
function parse_precip($in, $mm) {
@@ -242,9 +242,9 @@
/**
* Function used to parse a cloud-group.
*
- * @param array the cloud-group to be parsed.
- * @return string the string used in the pretty-print.
- * @access private
+ * @param array the cloud-group to be parsed.
+ * @return string the string used in the pretty-print.
+ * @access private
*/
function parse_cloud_group($cloud_group) {
if (empty($cloud_group) || !is_array($cloud_group)) {
@@ -303,9 +303,9 @@
/**
* Function used to parse a weather-group.
*
- * @param array the weather-group to be parsed.
- * @return string the string used in the pretty-print.
- * @access private
+ * @param array the weather-group to be parsed.
+ * @return string the string used in the pretty-print.
+ * @access private
*/
function parse_weather_group($weather_group) {
if (empty($weather_group)) {
@@ -329,9 +329,9 @@
/**
* Function used to parse the tendency in a runway-group.
*
- * @param string the tendency
- * @return string the string used in the pretty-print.
- * @access private
+ * @param string the tendency
+ * @return string the string used in the pretty-print.
+ * @access private
*/
function runway_tendency($tendency) {
if (empty($tendency)) {
@@ -357,9 +357,9 @@
/**
* Function used to parse a runway-group.
*
- * @param array the runway-group to be parsed.
- * @return string the string used in the pretty-print.
- * @access private
+ * @param array the runway-group to be parsed.
+ * @return string the string used in the pretty-print.
+ * @access private
*/
function parse_runway_group($runway_group) {
if (empty($runway_group) || !is_array($runway_group)) {
@@ -419,9 +419,9 @@
/**
* Function used to parse a visibility-group.
*
- * @param array the visibility-group to be parsed.
- * @return string the string used in the pretty-print.
- * @access private
+ * @param array the visibility-group to be parsed.
+ * @return string the string used in the pretty-print.
+ * @access private
*/
function parse_visibility_group($visibility_group) {
if (empty($visibility_group) || !is_array($visibility_group)) {
@@ -479,9 +479,9 @@
*
* This is the function responsible for making the weather-report, also know as the
'pretty-print'.
*
- * @param array data taken from decode_metar()
- * @return string The pretty-printed output.
- * @access public
+ * @param array data taken from decode_metar()
+ * @return string The pretty-printed output.
+ * @access public
*/
function print_pretty($data) {
@@ -848,9 +848,9 @@
/**
* Makes a short weather-report in a table.
*
- * @param array data taken from decode_metar()
- * @return string The table with weather-data.
- * @access public
+ * @param array data taken from decode_metar()
+ * @return string The table with weather-data.
+ * @access public
*/
function print_table($data) {
_______________________________________________
PHPWeather-checkins mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/phpweather-checkins