1 | <?php |
||
25 | abstract class Service { |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $appName; |
||
31 | /** |
||
32 | * @var Environment |
||
33 | */ |
||
34 | protected $environment; |
||
35 | /** |
||
36 | * @var ILogger |
||
37 | */ |
||
38 | protected $logger; |
||
39 | |||
40 | /** |
||
41 | * Constructor |
||
42 | * |
||
43 | * @param string $appName |
||
44 | * @param Environment $environment |
||
45 | * @param ILogger $logger |
||
46 | */ |
||
47 | 111 | public function __construct( |
|
56 | |||
57 | /** |
||
58 | * Returns the file matching the given ID |
||
59 | * |
||
60 | * @param int $nodeId ID of the resource to locate |
||
61 | * |
||
62 | * @return Node |
||
63 | * @throws NotFoundServiceException |
||
64 | */ |
||
65 | 17 | public function getFile($nodeId) { |
|
76 | |||
77 | /** |
||
78 | * Returns the node matching the given ID |
||
79 | * |
||
80 | * @param int $nodeId ID of the resource to locate |
||
81 | * |
||
82 | * @return Node |
||
83 | * @throws NotFoundServiceException |
||
84 | */ |
||
85 | 17 | private function getNode($nodeId) { |
|
94 | |||
95 | /** |
||
96 | * Makes extra sure that we can actually do something with the file |
||
97 | * |
||
98 | * @param Node $node |
||
99 | * |
||
100 | * @throws NotFoundServiceException |
||
101 | */ |
||
102 | 13 | private function validateNode($node) { |
|
107 | |||
108 | } |
||
109 |