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