1 | <?php |
||
32 | 1 | class ResourcesProvider implements IResourcesProvider |
|
33 | { |
||
34 | /** |
||
35 | * Implement nette smart magic |
||
36 | */ |
||
37 | 1 | use Nette\SmartObject; |
|
38 | |||
39 | /** |
||
40 | * @var Entities\IResource[] |
||
41 | */ |
||
42 | private $resources = []; |
||
43 | |||
44 | /** |
||
45 | * @param string $id |
||
46 | * @param Entities\IResource|NULL $parent |
||
47 | * |
||
48 | * @return Entities\IResource |
||
49 | */ |
||
50 | public function addResource(string $id, ?Entities\IResource $parent = NULL) : Entities\IResource |
||
66 | |||
67 | /** |
||
68 | * @param string $id |
||
69 | * |
||
70 | * @return Entities\IResource |
||
71 | */ |
||
72 | public function getResource(string $id) : Entities\IResource |
||
80 | |||
81 | /** |
||
82 | * @return Entities\IResource[] |
||
83 | */ |
||
84 | public function findAll() : array |
||
88 | } |
||
89 |