cvs: pear /Services_Weather/Weather Weatherdotcom.php

From: Date: Mon, 06 Oct 2003 15:13:58 +0000
Subject: cvs: pear /Services_Weather/Weather Weatherdotcom.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13427@lists.php.net to get a copy of this message
eru Mon Oct 6 11:13:58 2003 EDT Modified files: /pear/Services_Weather/Weather Weatherdotcom.php Log: *Added checks for existing classes, needed by the services Index: pear/Services_Weather/Weather/Weatherdotcom.php diff -u pear/Services_Weather/Weather/Weatherdotcom.php:1.9 pear/Services_Weather/Weather/Weatherdotcom.php:1.10 --- pear/Services_Weather/Weather/Weatherdotcom.php:1.9 Mon Oct 6 10:00:59 2003 +++ pear/Services_Weather/Weather/Weatherdotcom.php Mon Oct 6 11:13:58 2003 @@ -16,13 +16,10 @@ // | Authors: Alexander Wirtz <alex@pc4p.net> | // +----------------------------------------------------------------------+ // -// $Id: Weatherdotcom.php,v 1.9 2003/10/06 14:00:59 eru Exp $ +// $Id: Weatherdotcom.php,v 1.10 2003/10/06 15:13:58 eru Exp $ require_once "Services/Weather/Common.php"; -require_once "XML/Parser.php"; -require_once "XML/Unserializer.php"; - // {{{ class Services_Weather_Weatherdotcom /** * PEAR::Services_Weather_Weatherdotcom @@ -88,6 +85,11 @@ function Services_Weather_Weatherdotcom() { $this->Services_Weather_Common(); + if (!$this->_hasUnserializer) { + return Services_Weather::raiseError(SERVICES_WEATHER_ERROR_XML_NOT_INSTALLED); + } + + require_once "XML/Unserializer.php"; $this->_unserializer = &new XML_Unserializer(array("complexType" => "object")); } // }}}

« previous php.pear.cvs (#13427) next »