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 | * @var Loader |
||
36 | */ |
||
37 | private $loader; |
||
38 | |||
39 | /** |
||
40 | * Initializes a new Repository. |
||
41 | * |
||
42 | * @param string $basePath |
||
43 | * @param Cache $cache |
||
44 | * @param Loader $loader |
||
45 | */ |
||
46 | public function __construct($basePath = null, Cache $cache = null, Loader $loader = null) |
||
52 | |||
53 | /** |
||
54 | * @param string $documentPath |
||
55 | * |
||
56 | * @return SwaggerDocument |
||
57 | */ |
||
58 | public function get($documentPath) |
||
72 | |||
73 | /** |
||
74 | * @param string $uri |
||
75 | * |
||
76 | * @return SwaggerDocument |
||
77 | * @throws ResourceNotReadableException |
||
78 | */ |
||
79 | private function load($uri) |
||
94 | } |
||
95 |