示例#1
0
 /**
  * Constructor
  *
  * @param string $xmlString The XML forecast data.
  */
 public function __construct($xmlString)
 {
     parent::__construct($xmlString);
     foreach ($this->xml->xpath('//station') as $station) {
         $this->stations[] = get_object_vars($station);
     }
 }
示例#2
0
 /**
  * Constructor
  *
  * @param string $xmlString The XML forecast data.
  */
 public function __construct($xmlString)
 {
     parent::__construct($xmlString);
     // calculate the number of days in the forecast
     $this->length = count($this->getStartTimes());
     // array cache for days
     $this->days = array();
 }