1 | <?php |
||
28 | abstract class AbstractRepository implements ResourceRepository |
||
29 | { |
||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public function getStack($path) |
||
34 | { |
||
35 | // The basic repositories are not editable: you cannot have multiple versions of the same resource. |
||
36 | return new ResourceStack(array($this->get($path))); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Validate a language is usable to search in repositories. |
||
41 | * |
||
42 | * @param string $language |
||
43 | */ |
||
44 | 214 | protected function validateSearchLanguage($language) |
|
50 | |||
51 | /** |
||
52 | * Sanitize a given path and check its validity. |
||
53 | * |
||
54 | * @param string $path |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | 556 | protected function sanitizePath($path) |
|
65 | } |
||
66 |