1 | <?php |
||
14 | class SiteDefinitionCollection extends NormalizedCollection |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | protected $onDuplicateAction = 'replace'; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | 1 | protected function getAlreadyExistsException($key) |
|
25 | { |
||
26 | 1 | return new RuntimeException("Media site '" . $key . "' already exists"); |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 3 | protected function getNotExistException($key) |
|
36 | |||
37 | /** |
||
38 | * Validate and normalize a site ID |
||
39 | * |
||
40 | * @param string $siteId |
||
41 | * @return string |
||
42 | */ |
||
43 | 30 | public function normalizeKey($siteId) |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 20 | public function normalizeValue($siteConfig) |
|
84 | |||
85 | /** |
||
86 | * Normalize a regexp / indexed array of regexps |
||
87 | * |
||
88 | * @param array|string |
||
89 | * @return array |
||
90 | */ |
||
91 | 19 | protected function normalizeRegexp($value) |
|
95 | |||
96 | /** |
||
97 | * Normalize the "scrape" value |
||
98 | * |
||
99 | * @param array |
||
100 | * @return array |
||
101 | */ |
||
102 | 19 | protected function normalizeScrape($value) |
|
118 | } |