| 1 | <?php |
||
| 17 | class Link |
||
| 18 | { |
||
| 19 | /** @var string */ |
||
| 20 | protected $title; |
||
| 21 | |||
| 22 | /** @var \DateTime */ |
||
| 23 | protected $from; |
||
| 24 | |||
| 25 | /** @var \DateTime */ |
||
| 26 | protected $to; |
||
| 27 | |||
| 28 | /** @var string */ |
||
| 29 | protected $description; |
||
| 30 | |||
| 31 | /** @var string */ |
||
| 32 | protected $address; |
||
| 33 | |||
| 34 | public function __construct(string $title, DateTime $from, DateTime $to) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $title |
||
| 48 | * @param \DateTime $from |
||
| 49 | * @param \DateTime $to |
||
| 50 | * |
||
| 51 | * @return static |
||
| 52 | */ |
||
| 53 | public static function create(string $title, DateTime $from, DateTime $to) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param string $description |
||
| 60 | * |
||
| 61 | * @return $this |
||
| 62 | */ |
||
| 63 | public function description(string $description) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param string $address |
||
| 72 | * |
||
| 73 | * @return $this |
||
| 74 | */ |
||
| 75 | public function address(string $address) |
||
| 81 | |||
| 82 | public function google(): string |
||
| 86 | |||
| 87 | public function yahoo(): string |
||
| 91 | |||
| 92 | public function __get($property) |
||
| 96 | } |
||
| 97 |