123456789101112131415161718192021222324252627 |
- <?php
- namespace App\Yr\Forecast\Tabular\Time;
- class WindDirection extends AbstractUnit{
- private $name;
- public function __construct(\SimpleXMLElement $xml) {
- parent::__construct(
- (float)$xml['deg'],
- (string)$xml['code']
- );
- $this->name = (string)$xml['name'];
- }
- public function diff(DiffInterface $d): bool {
- if (parent::diff($d))
- return $this->getUnit() != $f->getUnit();
- return false;
- }
- public function getName(): string {
- return $this->name;
- }
- }
|