From 362fd2f0e5d4709e8bd0b2286414fc09016ca4b9 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 17 Sep 2012 11:18:18 +0000
Subject: [PATCH] 1. Zmiana nazwy pliku LICENCE na LICENSE (US English). 2. Uwzględnienie plików ./img/*.png w pliku LICENSE. 3. Utworzenie pliku README.
---
modules/30_pogoda/api_yrno.php | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/modules/30_pogoda/api_yrno.php b/modules/30_pogoda/api_yrno.php
index 70e3b5a..d10944e 100644
--- a/modules/30_pogoda/api_yrno.php
+++ b/modules/30_pogoda/api_yrno.php
@@ -3,7 +3,7 @@
protected $xml;
protected $dane;
- var $symbols = array(
+ static $symbols = array(
1 => 'Słonecznie',
2 => 'Lekkie zachmurzenie',
3 => 'Częściowe zachmurzenie',
@@ -29,7 +29,7 @@
23 => 'Deszcz ze śniegiem, burze'
);
- var $wind = array(
+ static $wind = array(
'N' => 'północny',
'NW' => 'północno-zachodni',
'W' => 'zachodni',
@@ -39,6 +39,16 @@
'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();
@@ -52,16 +62,6 @@
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() {
@@ -96,8 +96,8 @@
}
$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(
--
Gitblit v1.9.1