1
|
|
|
<?php
|
2
|
|
|
|
3
|
|
|
namespace Resta\Foundation\PathManager;
|
4
|
|
|
|
5
|
|
|
use Resta\Support\Utils;
|
6
|
|
|
|
7
|
|
|
class StaticNamespaceRepository extends StaticPathRepository
|
8
|
|
|
{
|
9
|
|
|
/**
|
10
|
|
|
* @return string
|
11
|
|
|
*/
|
12
|
|
|
public function autoloadNamespace()
|
13
|
|
|
{
|
14
|
|
|
return StaticPathList::$autoloadNamespace;
|
15
|
|
|
}
|
16
|
|
|
|
17
|
|
|
/**
|
18
|
|
|
* @return string
|
19
|
|
|
*/
|
20
|
|
|
public function bootDir()
|
21
|
|
|
{
|
22
|
|
|
return StaticPathList::$boot;
|
23
|
|
|
}
|
24
|
|
|
|
25
|
|
|
/**
|
26
|
|
|
* @return string
|
27
|
|
|
*/
|
28
|
|
|
public function builder()
|
29
|
|
|
{
|
30
|
|
|
return Utils::getNamespace(parent::builder());
|
|
|
|
|
31
|
|
|
}
|
32
|
|
|
|
33
|
|
|
/**
|
34
|
|
|
* @param null $endpoint
|
|
|
|
|
35
|
|
|
* @param $bind
|
36
|
|
|
* @return mixed|string
|
37
|
|
|
*/
|
38
|
|
|
public function controller($endpoint=null,$bind=array())
|
39
|
|
|
{
|
40
|
|
|
$call=Utils::getNamespace($this->appCall());
|
41
|
|
|
|
42
|
|
|
if($endpoint===null) return $call;
|
|
|
|
|
43
|
|
|
|
44
|
|
|
$bundleName = $call.'\\'.ucfirst($endpoint).''.StaticPathList::$controllerBundleName.'';
|
45
|
|
|
|
46
|
|
|
$endpointCall=$bundleName.'\\'.ucfirst($endpoint).''.StaticPathModel::$callClassPrefix;
|
47
|
|
|
|
48
|
|
|
if($bind===true) return $endpointCall;
|
49
|
|
|
|
50
|
|
|
if($bind=="bundle") return $bundleName;
|
51
|
|
|
|
52
|
|
|
return app()->resolve($endpointCall,$bind);
|
53
|
|
|
}
|
54
|
|
|
|
55
|
|
|
/**
|
56
|
|
|
* @return string
|
57
|
|
|
*/
|
58
|
|
|
public function command()
|
59
|
|
|
{
|
60
|
|
|
return Utils::getNamespace(parent::command());
|
|
|
|
|
61
|
|
|
}
|
62
|
|
|
|
63
|
|
|
/**
|
64
|
|
|
* @return mixed
|
65
|
|
|
*/
|
66
|
|
|
public function config()
|
67
|
|
|
{
|
68
|
|
|
return Utils::getNamespace(parent::config());
|
|
|
|
|
69
|
|
|
}
|
70
|
|
|
|
71
|
|
|
/**
|
72
|
|
|
* @return mixed
|
73
|
|
|
*/
|
74
|
|
|
public function helpers()
|
75
|
|
|
{
|
76
|
|
|
return Utils::getNamespace(parent::helpers());
|
|
|
|
|
77
|
|
|
}
|
78
|
|
|
|
79
|
|
|
/**
|
80
|
|
|
* @return mixed
|
81
|
|
|
*/
|
82
|
|
|
public function tests()
|
83
|
|
|
{
|
84
|
|
|
return Utils::getNamespace(parent::tests());
|
|
|
|
|
85
|
|
|
}
|
86
|
|
|
|
87
|
|
|
/**
|
88
|
|
|
* @return mixed
|
89
|
|
|
*/
|
90
|
|
|
public function workers()
|
91
|
|
|
{
|
92
|
|
|
return Utils::getNamespace(parent::workers());
|
|
|
|
|
93
|
|
|
}
|
94
|
|
|
|
95
|
|
|
/**
|
96
|
|
|
* @return mixed
|
97
|
|
|
*/
|
98
|
|
|
public function schedule()
|
99
|
|
|
{
|
100
|
|
|
return Utils::getNamespace(parent::schedule());
|
|
|
|
|
101
|
|
|
}
|
102
|
|
|
|
103
|
|
|
/**
|
104
|
|
|
* @return mixed
|
105
|
|
|
*/
|
106
|
|
|
public function kernel()
|
107
|
|
|
{
|
108
|
|
|
return Utils::getNamespace(parent::kernel());
|
|
|
|
|
109
|
|
|
}
|
110
|
|
|
|
111
|
|
|
/**
|
112
|
|
|
* @return mixed
|
113
|
|
|
*/
|
114
|
|
|
public function provider()
|
115
|
|
|
{
|
116
|
|
|
return Utils::getNamespace(parent::provider());
|
|
|
|
|
117
|
|
|
}
|
118
|
|
|
|
119
|
|
|
/**
|
120
|
|
|
* @return mixed
|
121
|
|
|
*/
|
122
|
|
|
public function logger()
|
123
|
|
|
{
|
124
|
|
|
return Utils::getNamespace(parent::logger());
|
|
|
|
|
125
|
|
|
}
|
126
|
|
|
|
127
|
|
|
/**
|
128
|
|
|
* @return mixed
|
129
|
|
|
*/
|
130
|
|
|
public function middleware()
|
131
|
|
|
{
|
132
|
|
|
return Utils::getNamespace(parent::middleware());
|
|
|
|
|
133
|
|
|
}
|
134
|
|
|
|
135
|
|
|
/**
|
136
|
|
|
* @return mixed
|
137
|
|
|
*/
|
138
|
|
|
public function factory()
|
139
|
|
|
{
|
140
|
|
|
return Utils::getNamespace(parent::factory());
|
|
|
|
|
141
|
|
|
}
|
142
|
|
|
|
143
|
|
|
/**
|
144
|
|
|
* @return mixed
|
145
|
|
|
*/
|
146
|
|
|
public function migration()
|
147
|
|
|
{
|
148
|
|
|
return Utils::getNamespace(parent::migration());
|
|
|
|
|
149
|
|
|
}
|
150
|
|
|
|
151
|
|
|
/**
|
152
|
|
|
* @return mixed
|
153
|
|
|
*/
|
154
|
|
|
public function model()
|
155
|
|
|
{
|
156
|
|
|
return Utils::getNamespace(parent::model());
|
|
|
|
|
157
|
|
|
}
|
158
|
|
|
|
159
|
|
|
/**
|
160
|
|
|
* @return mixed
|
161
|
|
|
*/
|
162
|
|
|
public function exception()
|
163
|
|
|
{
|
164
|
|
|
return Utils::getNamespace(parent::exception());
|
|
|
|
|
165
|
|
|
}
|
166
|
|
|
|
167
|
|
|
/**
|
168
|
|
|
* @return mixed
|
169
|
|
|
*/
|
170
|
|
|
public function optionalEvents()
|
171
|
|
|
{
|
172
|
|
|
return Utils::getNamespace(parent::optionalEvents());
|
|
|
|
|
173
|
|
|
}
|
174
|
|
|
|
175
|
|
|
/**
|
176
|
|
|
* @return mixed
|
177
|
|
|
*/
|
178
|
|
|
public function optionalJob()
|
179
|
|
|
{
|
180
|
|
|
return Utils::getNamespace(parent::optionalJob());
|
|
|
|
|
181
|
|
|
}
|
182
|
|
|
|
183
|
|
|
/**
|
184
|
|
|
* @return mixed
|
185
|
|
|
*/
|
186
|
|
|
public function optionalListeners()
|
187
|
|
|
{
|
188
|
|
|
return Utils::getNamespace(parent::optionalListeners());
|
|
|
|
|
189
|
|
|
}
|
190
|
|
|
|
191
|
|
|
/**
|
192
|
|
|
* @return mixed
|
193
|
|
|
*/
|
194
|
|
|
public function optionalSubscribers()
|
195
|
|
|
{
|
196
|
|
|
return Utils::getNamespace(parent::optionalSubscribers());
|
|
|
|
|
197
|
|
|
}
|
198
|
|
|
|
199
|
|
|
/**
|
200
|
|
|
* @return mixed
|
201
|
|
|
*/
|
202
|
|
|
public function optionalSource()
|
203
|
|
|
{
|
204
|
|
|
return Utils::getNamespace(parent::optionalSource());
|
|
|
|
|
205
|
|
|
}
|
206
|
|
|
|
207
|
|
|
/**
|
208
|
|
|
* @return mixed
|
209
|
|
|
*/
|
210
|
|
|
public function optionalWebservice()
|
211
|
|
|
{
|
212
|
|
|
return Utils::getNamespace(parent::optionalWebservice());
|
|
|
|
|
213
|
|
|
}
|
214
|
|
|
|
215
|
|
|
/**
|
216
|
|
|
* @return mixed
|
217
|
|
|
*/
|
218
|
|
|
public function request()
|
219
|
|
|
{
|
220
|
|
|
return Utils::getNamespace(parent::request());
|
|
|
|
|
221
|
|
|
}
|
222
|
|
|
|
223
|
|
|
/**
|
224
|
|
|
* @return mixed
|
225
|
|
|
*/
|
226
|
|
|
public function repository()
|
227
|
|
|
{
|
228
|
|
|
return Utils::getNamespace(parent::repository());
|
|
|
|
|
229
|
|
|
}
|
230
|
|
|
|
231
|
|
|
/**
|
232
|
|
|
* @return mixed
|
233
|
|
|
*/
|
234
|
|
|
public function route()
|
235
|
|
|
{
|
236
|
|
|
return Utils::getNamespace(parent::route());
|
|
|
|
|
237
|
|
|
}
|
238
|
|
|
|
239
|
|
|
/**
|
240
|
|
|
* @return mixed
|
241
|
|
|
*/
|
242
|
|
|
public function serviceAnnotations()
|
243
|
|
|
{
|
244
|
|
|
return Utils::getNamespace(parent::serviceAnnotations());
|
|
|
|
|
245
|
|
|
}
|
246
|
|
|
|
247
|
|
|
|
248
|
|
|
/**
|
249
|
|
|
* @return mixed
|
250
|
|
|
*/
|
251
|
|
|
public function serviceEventDispatcher()
|
252
|
|
|
{
|
253
|
|
|
return Utils::getNamespace(parent::ServiceEventDispatcher());
|
|
|
|
|
254
|
|
|
}
|
255
|
|
|
|
256
|
|
|
/**
|
257
|
|
|
* @return mixed
|
258
|
|
|
*/
|
259
|
|
|
public function serviceMiddleware()
|
260
|
|
|
{
|
261
|
|
|
return Utils::getNamespace(parent::serviceMiddleware());
|
|
|
|
|
262
|
|
|
}
|
263
|
|
|
|
264
|
|
|
/**
|
265
|
|
|
* @return string
|
266
|
|
|
*/
|
267
|
|
|
public function storeConfigDir()
|
268
|
|
|
{
|
269
|
|
|
return $this->storeDir().'\Config';
|
270
|
|
|
}
|
271
|
|
|
|
272
|
|
|
/**
|
273
|
|
|
* @return string
|
274
|
|
|
*/
|
275
|
|
|
public function storeDir()
|
276
|
|
|
{
|
277
|
|
|
return StaticPathList::$store;
|
278
|
|
|
}
|
279
|
|
|
|
280
|
|
|
/**
|
281
|
|
|
* @return mixed
|
282
|
|
|
*/
|
283
|
|
|
public function stubs()
|
284
|
|
|
{
|
285
|
|
|
return Utils::getNamespace(parent::stubs());
|
|
|
|
|
286
|
|
|
}
|
287
|
|
|
|
288
|
|
|
/**
|
289
|
|
|
* @return mixed
|
290
|
|
|
*/
|
291
|
|
|
public function version()
|
292
|
|
|
{
|
293
|
|
|
return Utils::getNamespace(parent::version());
|
|
|
|
|
294
|
|
|
}
|
295
|
|
|
} |