1 | <?php |
||
9 | class EntityDescriptorFileProvider implements EntityDescriptorProviderInterface |
||
10 | { |
||
11 | /** @var KernelInterface */ |
||
12 | protected $kernel; |
||
13 | |||
14 | /** @var string */ |
||
15 | protected $filename; |
||
16 | |||
17 | /** @var string|null */ |
||
18 | protected $entityId; |
||
19 | |||
20 | /** @var EntityDescriptor|null */ |
||
21 | private $entityDescriptor; |
||
22 | |||
23 | |||
24 | |||
25 | function __construct(KernelInterface $kernel) |
||
29 | |||
30 | |||
31 | /** |
||
32 | * @param string $filename |
||
33 | * @throws \InvalidArgumentException |
||
34 | */ |
||
35 | public function setFilename($filename) |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getFilename() |
||
53 | |||
54 | /** |
||
55 | * @param null|string $entityId |
||
56 | */ |
||
57 | public function setEntityId($entityId) |
||
61 | |||
62 | /** |
||
63 | * @return null|string |
||
64 | */ |
||
65 | public function getEntityId() |
||
69 | |||
70 | |||
71 | |||
72 | |||
73 | /** |
||
74 | * @return EntityDescriptor |
||
75 | */ |
||
76 | public function getEntityDescriptor() |
||
83 | |||
84 | |||
85 | protected function load() |
||
98 | } |
||
99 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.