easyYr
php framework for fetching weather data from yr.no

Documentation: yrData.class.php

Subclass of yrFetch. Class parsing data from XML to object structure.

<?php
class yrData extends yrDataContainer {
  
/*
  Class for managing weather forecast data from yr.no.
  */
  
  
public function __construct($xml$county$commune$place)
    
/*
    Constructor.
    $xml (string): XML weather data from yr.no
    $county, $commune, $place (string): County, commune and place for this forecast.
    */
    
  
private function parse($xml$county$commune$place)
    
/*
    Parses XML weather data.
    */
    
  
private function parseTime($xmlTime)
    
/*
    Converts $time from time representation in XML to time represented as Unix timestamp.
    */
}  
?>