Video.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\View\Embed; |
| 6 | |
| 7 | use AC\View; |
| 8 | |
| 9 | class Video extends View |
| 10 | { |
| 11 | public function __construct(array $attributes = []) |
| 12 | { |
| 13 | parent::__construct(); |
| 14 | |
| 15 | $this->set('attributes', $attributes); |
| 16 | $this->set_template('embed/video'); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @return static |
| 21 | */ |
| 22 | public function set_src(string $src): self |
| 23 | { |
| 24 | $this->set('src', $src); |
| 25 | |
| 26 | return $this; |
| 27 | } |
| 28 | |
| 29 | } |
| 30 |