1 | <?php |
||
17 | class DocumentRepository |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $basePath; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $documents = []; |
||
28 | |||
29 | /** |
||
30 | * @var Cache |
||
31 | */ |
||
32 | private $cache; |
||
33 | |||
34 | /** |
||
35 | * Initializes a new Repository. |
||
36 | * |
||
37 | * @param string $basePath |
||
38 | * @param Cache $cache |
||
39 | */ |
||
40 | public function __construct($basePath = null, Cache $cache = null) |
||
45 | |||
46 | /** |
||
47 | * @param string $documentPath |
||
48 | * |
||
49 | * @return SwaggerDocument |
||
50 | */ |
||
51 | public function get($documentPath) |
||
65 | |||
66 | /** |
||
67 | * @param string $documentPath |
||
68 | * |
||
69 | * @return SwaggerDocument |
||
70 | * @throws ResourceNotReadableException |
||
71 | */ |
||
72 | private function load($documentPath) |
||
92 | } |
||
93 |