12345678910111213141516171819202122232425 |
- <?php
- namespace App\Yr\Forecast\Tabular\Time;
- class DiffEntity implements DiffInterface {
- private $time;
- private $entity;
- public function __construct(Time $t, DiffInterface $d) {
- $this->time = $t;
- $this->entity = $d;
- }
- public function getOccuringTime(): \DateTimeInterface {
- return $time->getFrom();
- }
- public function diff(DiffInterface $d): bool {
- if ($d instanceof get_class($this->entity))
- return $this->entity->diff($d);
- return false;
- }
- }
|