From 5ab2921256e688e2f005b04bfe08f8c8bb91fd68 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Wed, 11 Jun 2014 20:57:09 +0000 Subject: [PATCH] [core] Poprawka literówki w klasie BotPull --- 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