| 1 | <?php |
||
| 7 | class ImmutableAssetType implements AssetTypeInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $name; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Asset[] |
||
| 16 | */ |
||
| 17 | private $assets = []; |
||
| 18 | |||
| 19 | public function __construct(string $name, array $assets) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | public function getName(): string |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Asset[] |
||
| 35 | */ |
||
| 36 | public function getAssets() : array |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Creates an ImmutableAssetType from a PHP array. |
||
| 43 | * |
||
| 44 | * @param string $name |
||
| 45 | * @param array $assetsArray |
||
| 46 | * @return ImmutableAssetType |
||
| 47 | */ |
||
| 48 | public static function fromArray(string $name, array $assetsArray) : ImmutableAssetType |
||
| 55 | } |
||
| 56 |