Install
2 days ago
Setup
2 days ago
SetupFactory
2 days ago
Update
2 days ago
Install.php
2 days ago
InstallCollection.php
2 days ago
Setup.php
2 days ago
SetupFactory.php
2 days ago
Update.php
2 days ago
UpdateCollection.php
2 days ago
Version.php
2 days ago
InstallCollection.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Plugin; |
| 6 | |
| 7 | use AC; |
| 8 | |
| 9 | final class InstallCollection extends AC\Collection |
| 10 | { |
| 11 | public function __construct(array $data = []) |
| 12 | { |
| 13 | array_map([$this, 'add'], $data); |
| 14 | } |
| 15 | |
| 16 | protected function add(Install $install): void |
| 17 | { |
| 18 | $this->data[] = $install; |
| 19 | } |
| 20 | |
| 21 | public function current(): Install |
| 22 | { |
| 23 | return current($this->data); |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |