1 | <?php |
||
32 | final class ReloadableInMemoryRepository implements ReloadableThemeRepositoryInterface |
||
33 | { |
||
34 | /** |
||
35 | * @var ThemeInterface[] |
||
36 | */ |
||
37 | private $themes = []; |
||
38 | |||
39 | /** |
||
40 | * @var ThemeLoaderInterface |
||
41 | */ |
||
42 | private $themeLoader; |
||
43 | |||
44 | /** |
||
45 | * @var bool |
||
46 | */ |
||
47 | private $themesLoaded = false; |
||
48 | |||
49 | /** |
||
50 | * @param ThemeLoaderInterface $themeLoader |
||
51 | */ |
||
52 | public function __construct(ThemeLoaderInterface $themeLoader) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function reloadThemes(): void |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function findAll() |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function findOneByName($name) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function findOneByTitle($title) |
||
101 | |||
102 | private function loadThemesIfNeeded() |
||
115 | } |
||
116 |