1234567891011121314151617181920212223 |
- <?php
- namespace App\Yr\Forecast\Tabular\Time;
- /**
- * Temperature
- *
- * @author Joachim M. Giæver (joachim[]giaever.org)
- */
- class Temperature extends AbstractUnit {
- const DEFAULT_VARIANCE = 2;
- /**
- * @param \SimpleXMLElement $xml XML containing the temperature
- */
- public function __construct(\SimpleXMLElement $xml) {
- parent::__construct(
- (float)$xml['value'],
- (string)$xml['unit']
- );
- }
- }
|