| | |
| | | protected $xml; |
| | | protected $dane; |
| | | |
| | | var $symbols = array( |
| | | static $symbols = array( |
| | | 1 => 'Słonecznie', |
| | | 2 => 'Lekkie zachmurzenie', |
| | | 3 => 'Częściowe zachmurzenie', |
| | |
| | | 23 => 'Deszcz ze śniegiem, burze' |
| | | ); |
| | | |
| | | var $wind = array( |
| | | static $wind = array( |
| | | 'N' => 'północny', |
| | | 'NW' => 'północno-zachodni', |
| | | 'W' => 'zachodni', |
| | |
| | | 'E' => 'wschodni', |
| | | 'NE' => 'północno-wschodni', |
| | | ); |
| | | |
| | | static function wind($dir) { |
| | | if(isset(self::$wind[$dir])) { |
| | | return self::$wind[$dir]; |
| | | } |
| | | else |
| | | { |
| | | return ''; |
| | | } |
| | | } |
| | | |
| | | function __construct($xml) { |
| | | libxml_use_internal_errors(); |
| | |
| | | |
| | | function mktime($time) { |
| | | return strtotime(substr($time, 0, -1)); |
| | | } |
| | | |
| | | function wind($dir) { |
| | | if(isset($this->wind[$dir])) { |
| | | return $this->wind[$dir]; |
| | | } |
| | | else |
| | | { |
| | | return ''; |
| | | } |
| | | } |
| | | |
| | | function parseForecast() { |
| | |
| | | } |
| | | |
| | | $icon = (int)$time->symbol->attributes()->number; |
| | | if(is_int($this->symbols[$icon])) { |
| | | $icon = $this->symbols[$icon]; |
| | | if(is_int(self::$symbols[$icon])) { |
| | | $icon = self::$symbols[$icon]; |
| | | } |
| | | |
| | | $this->dane[$put][$to] = array( |
| | |
| | | unset($wind['day']); |
| | | } |
| | | |
| | | return array($temp, $wind); |
| | | return array('temp' => $temp, 'wind' => $wind); |
| | | } |
| | | |
| | | function getDaypartIcon($timestamp) { |