3 * OpenWeatherMap-PHP-API — A php api to parse weather data from http://www.OpenWeatherMap.org .
7 * Please see the LICENSE file distributed with this source code for further
8 * information regarding copyright and licensing.
10 * Please visit the following links to read about the usage policies and the license of
11 * OpenWeatherMap before using this class:
13 * @see http://www.OpenWeatherMap.org
14 * @see http://www.OpenWeatherMap.org/terms
15 * @see http://openweathermap.org/appid
18 namespace Cmfcmf\OpenWeatherMap\Util;
21 * The temperature class representing a temperature object.
26 * @var Unit The current temperature.
31 * @var Unit The minimal temperature.
36 * @var Unit The maximal temperature.
41 * Returns the current temperature as formatted string.
43 * @return string The current temperature as a formatted string.
45 public function __toString()
47 return $this->now->__toString();
51 * Returns the current temperature's unit.
53 * @return string The current temperature's unit.
55 public function getUnit()
57 return $this->now->getUnit();
61 * Returns the current temperature.
63 * @return string The current temperature.
65 public function getValue()
67 return $this->now->getValue();
71 * Returns the current temperature's description.
73 * @return string The current temperature's description.
75 public function getDescription()
77 return $this->now->getDescription();
81 * Returns the current temperature as formatted string.
83 * @return string The current temperature as formatted string.
85 public function getFormatted()
87 return $this->now->getFormatted();
91 * Create a new temperature object.
93 * @param Unit $now The current temperature.
94 * @param Unit $min The minimal temperature.
95 * @param Unit $max The maximal temperature.
99 public function __construct(Unit $now, Unit $min, Unit $max)