Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv5905
Modified Files:
base_object.php data_retrieval.php db_layer.php phpweather.php
Log Message:
All constructors can now be called without any parameters - they all
use an empty array as the default. This was removed some time ago
because it didn't work in PHP3, but now that we're using PHP4 it works
again.
I also made an extra check in output/pw_text.php so that missing
clouds no longer trigger a warning.
Index: base_object.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/base_object.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- base_object.php 20 Mar 2002 19:26:50 -0000 1.12
+++ base_object.php 15 May 2002 22:23:26 -0000 1.13
@@ -59,7 +59,7 @@
* @param $input array The initial properties of the object
* @see $properties
*/
- function base_object($input) {
+ function base_object($input = array()) {
include(PHPWEATHER_BASE_DIR . '/defaults-dist.php');
Index: data_retrieval.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- data_retrieval.php 12 Apr 2002 22:10:43 -0000 1.22
+++ data_retrieval.php 15 May 2002 22:23:26 -0000 1.23
@@ -40,7 +40,7 @@
* @access private
* @param array The initial properties of the object.
*/
- function data_retrieval($input) {
+ function data_retrieval($input = array()) {
/* We start by calling the parent constructor. */
$this->db_layer($input);
Index: db_layer.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_layer.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- db_layer.php 20 Mar 2002 19:26:50 -0000 1.12
+++ db_layer.php 15 May 2002 22:23:26 -0000 1.13
@@ -31,7 +31,7 @@
*
* @param $input array Initial properties for the object.
*/
- function db_layer($input) {
+ function db_layer($input = array()) {
/* We call the parent constructor. */
$this->base_object($input);
Index: phpweather.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- phpweather.php 12 May 2002 15:08:59 -0000 1.24
+++ phpweather.php 15 May 2002 22:23:26 -0000 1.25
@@ -50,7 +50,7 @@
*
* @param array The initial properties of the object.
*/
- function metar_parser($input) {
+ function metar_parser($input = array()) {
/* This class doesn't have any defaults, so it just calls the
* parent constructor.
*/
|