1 | <?php |
||
15 | class EmbedCollection extends AbstractCollection |
||
16 | { |
||
17 | /** |
||
18 | * @var EmbedMetadata |
||
19 | */ |
||
20 | protected $metadata; |
||
21 | |||
22 | /** |
||
23 | * Constructor. |
||
24 | * |
||
25 | * @param EmbedMetadata $metadata |
||
26 | * @param Store $store |
||
27 | * @param AbstractModel[] $models |
||
28 | */ |
||
29 | public function __construct(EmbedMetadata $metadata, Store $store, array $models = []) |
||
34 | |||
35 | /** |
||
36 | * Creates a new Embed model instance based on the collection |
||
37 | * |
||
38 | * @return Embed |
||
39 | */ |
||
40 | public function createNewEmbed() |
||
46 | |||
47 | /** |
||
48 | * Gets the metadata for the model collection. |
||
49 | * |
||
50 | * @return EmbedMetadata |
||
51 | */ |
||
52 | public function getMetadata() |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function getType() |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function isDirty() |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | protected function validateAdd(AbstractModel $model) |
||
84 | |||
85 | /** |
||
86 | * Validates that the model class instance is supported. |
||
87 | * |
||
88 | * @param AbstractModel $model |
||
89 | * @throws \InvalidArgumentException |
||
90 | */ |
||
91 | protected function validateModelClass(AbstractModel $model) |
||
97 | } |
||
98 |