1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* sami.js.twig */ |
4
|
|
|
class __TwigTemplate_1af9ac9d8e6bdab055b91c0b315695ba76def72622bbd698fddd8fae39f228e2 extends Twig_Template |
|
|
|
|
5
|
|
|
{ |
6
|
|
|
public function __construct(Twig_Environment $env) |
7
|
|
|
{ |
8
|
|
|
parent::__construct($env); |
9
|
|
|
|
10
|
|
|
$this->parent = false; |
11
|
|
|
|
12
|
|
|
$this->blocks = array( |
13
|
|
|
'search_index' => array($this, 'block_search_index'), |
14
|
|
|
'search_index_extra' => array($this, 'block_search_index_extra'), |
15
|
|
|
'treejs' => array($this, 'block_treejs'), |
16
|
|
|
); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
protected function doDisplay(array $context, array $blocks = array()) |
20
|
|
|
{ |
21
|
|
|
// line 1 |
22
|
|
|
$context["__internal_3abfe7d95b8e3dc37a5cb5534978c7915201cd06e8e3449801da4b7670b2eea7"] = $this; |
23
|
|
|
// line 2 |
24
|
|
|
echo " |
25
|
|
|
(function(root) { |
26
|
|
|
|
27
|
|
|
var bhIndex = null; |
28
|
|
|
var rootPath = ''; |
29
|
|
|
var treeHtml = '"; |
30
|
|
|
// line 7 |
31
|
|
|
echo twig_replace_filter($context["__internal_3abfe7d95b8e3dc37a5cb5534978c7915201cd06e8e3449801da4b7670b2eea7"]->getelement((isset($context["tree"]) ? $context["tree"] : $this->getContext($context, "tree")), $this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "default_opened_level"), "method"), 0), array("'" => "\\'", " |
32
|
|
|
" => "")); |
33
|
|
|
echo "'; |
34
|
|
|
|
35
|
|
|
var searchTypeClasses = { |
36
|
|
|
'Namespace': 'label-default', |
37
|
|
|
'Class': 'label-info', |
38
|
|
|
'Interface': 'label-primary', |
39
|
|
|
'Trait': 'label-success', |
40
|
|
|
'Method': 'label-danger', |
41
|
|
|
'_': 'label-warning' |
42
|
|
|
}; |
43
|
|
|
|
44
|
|
|
var searchIndex = [ |
45
|
|
|
"; |
46
|
|
|
// line 19 |
47
|
|
|
$this->displayBlock('search_index', $context, $blocks); |
48
|
|
|
// line 39 |
49
|
|
|
echo " // Fix trailing commas in the index |
50
|
|
|
{} |
51
|
|
|
]; |
52
|
|
|
|
53
|
|
|
/** Tokenizes strings by namespaces and functions */ |
54
|
|
|
function tokenizer(term) { |
55
|
|
|
if (!term) { |
56
|
|
|
return []; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
var tokens = [term]; |
60
|
|
|
var meth = term.indexOf('::'); |
61
|
|
|
|
62
|
|
|
// Split tokens into methods if \"::\" is found. |
63
|
|
|
if (meth > -1) { |
64
|
|
|
tokens.push(term.substr(meth + 2)); |
65
|
|
|
term = term.substr(0, meth - 2); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
// Split by namespace or fake namespace. |
69
|
|
|
if (term.indexOf('\\\\') > -1) { |
70
|
|
|
tokens = tokens.concat(term.split('\\\\')); |
71
|
|
|
} else if (term.indexOf('_') > 0) { |
72
|
|
|
tokens = tokens.concat(term.split('_')); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
// Merge in splitting the string by case and return |
76
|
|
|
tokens = tokens.concat(term.match(/(([A-Z]?[^A-Z]*)|([a-z]?[^a-z]*))/g).slice(0,-1)); |
77
|
|
|
|
78
|
|
|
return tokens; |
79
|
|
|
}; |
80
|
|
|
|
81
|
|
|
root.Sami = { |
82
|
|
|
/** |
83
|
|
|
* Cleans the provided term. If no term is provided, then one is |
84
|
|
|
* grabbed from the query string \"search\" parameter. |
85
|
|
|
*/ |
86
|
|
|
cleanSearchTerm: function(term) { |
87
|
|
|
// Grab from the query string |
88
|
|
|
if (typeof term === 'undefined') { |
89
|
|
|
var name = 'search'; |
90
|
|
|
var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"); |
91
|
|
|
var results = regex.exec(location.search); |
92
|
|
|
if (results === null) { |
93
|
|
|
return null; |
94
|
|
|
} |
95
|
|
|
term = decodeURIComponent(results[1].replace(/\\+/g, \" \")); |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
return term.replace(/<(?:.|\\n)*?>/gm, ''); |
99
|
|
|
}, |
100
|
|
|
|
101
|
|
|
/** Searches through the index for a given term */ |
102
|
|
|
search: function(term) { |
103
|
|
|
// Create a new search index if needed |
104
|
|
|
if (!bhIndex) { |
105
|
|
|
bhIndex = new Bloodhound({ |
106
|
|
|
limit: 500, |
107
|
|
|
local: searchIndex, |
108
|
|
|
datumTokenizer: function (d) { |
109
|
|
|
return tokenizer(d.name); |
110
|
|
|
}, |
111
|
|
|
queryTokenizer: Bloodhound.tokenizers.whitespace |
112
|
|
|
}); |
113
|
|
|
bhIndex.initialize(); |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
results = []; |
117
|
|
|
bhIndex.get(term, function(matches) { |
118
|
|
|
results = matches; |
119
|
|
|
}); |
120
|
|
|
|
121
|
|
|
if (!rootPath) { |
122
|
|
|
return results; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
// Fix the element links based on the current page depth. |
126
|
|
|
return \$.map(results, function(ele) { |
127
|
|
|
if (ele.link.indexOf('..') > -1) { |
128
|
|
|
return ele; |
129
|
|
|
} |
130
|
|
|
ele.link = rootPath + ele.link; |
131
|
|
|
if (ele.fromLink) { |
132
|
|
|
ele.fromLink = rootPath + ele.fromLink; |
133
|
|
|
} |
134
|
|
|
return ele; |
135
|
|
|
}); |
136
|
|
|
}, |
137
|
|
|
|
138
|
|
|
/** Get a search class for a specific type */ |
139
|
|
|
getSearchClass: function(type) { |
140
|
|
|
return searchTypeClasses[type] || searchTypeClasses['_']; |
141
|
|
|
}, |
142
|
|
|
|
143
|
|
|
/** Add the left-nav tree to the site */ |
144
|
|
|
injectApiTree: function(ele) { |
145
|
|
|
ele.html(treeHtml); |
146
|
|
|
} |
147
|
|
|
}; |
148
|
|
|
|
149
|
|
|
\$(function() { |
150
|
|
|
// Modify the HTML to work correctly based on the current depth |
151
|
|
|
rootPath = \$('body').attr('data-root-path'); |
152
|
|
|
treeHtml = treeHtml.replace(/href=\"/g, 'href=\"' + rootPath); |
153
|
|
|
Sami.injectApiTree(\$('#api-tree')); |
154
|
|
|
}); |
155
|
|
|
|
156
|
|
|
return root.Sami; |
157
|
|
|
})(window); |
158
|
|
|
|
159
|
|
|
\$(function() { |
160
|
|
|
|
161
|
|
|
// Enable the version switcher |
162
|
|
|
\$('#version-switcher').change(function() { |
163
|
|
|
window.location = \$(this).val() |
164
|
|
|
}); |
165
|
|
|
|
166
|
|
|
"; |
167
|
|
|
// line 156 |
168
|
|
|
$this->displayBlock('treejs', $context, $blocks); |
169
|
|
|
// line 182 |
170
|
|
|
echo " |
171
|
|
|
"; |
172
|
|
|
// line 210 |
173
|
|
|
echo " |
174
|
|
|
var form = \$('#search-form .typeahead'); |
175
|
|
|
form.typeahead({ |
176
|
|
|
hint: true, |
177
|
|
|
highlight: true, |
178
|
|
|
minLength: 1 |
179
|
|
|
}, { |
180
|
|
|
name: 'search', |
181
|
|
|
displayKey: 'name', |
182
|
|
|
source: function (q, cb) { |
183
|
|
|
cb(Sami.search(q)); |
184
|
|
|
} |
185
|
|
|
}); |
186
|
|
|
|
187
|
|
|
// The selection is direct-linked when the user selects a suggestion. |
188
|
|
|
form.on('typeahead:selected', function(e, suggestion) { |
189
|
|
|
window.location = suggestion.link; |
190
|
|
|
}); |
191
|
|
|
|
192
|
|
|
// The form is submitted when the user hits enter. |
193
|
|
|
form.keypress(function (e) { |
194
|
|
|
if (e.which == 13) { |
195
|
|
|
\$('#search-form').submit(); |
196
|
|
|
return true; |
197
|
|
|
} |
198
|
|
|
}); |
199
|
|
|
|
200
|
|
|
"; |
201
|
|
|
echo " |
202
|
|
|
}); |
203
|
|
|
|
204
|
|
|
"; |
205
|
|
|
// line 222 |
206
|
|
|
echo " |
207
|
|
|
"; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
// line 19 |
211
|
|
|
public function block_search_index($context, array $blocks = array()) |
|
|
|
|
212
|
|
|
{ |
213
|
|
|
// line 20 |
214
|
|
|
echo " "; |
215
|
|
|
$context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"] = $this; |
216
|
|
|
// line 21 |
217
|
|
|
echo " |
218
|
|
|
"; |
219
|
|
|
// line 22 |
220
|
|
|
$context['_parent'] = $context; |
221
|
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["namespaces"]) ? $context["namespaces"] : $this->getContext($context, "namespaces"))); |
222
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["ns"]) { |
223
|
|
|
// line 23 |
224
|
|
|
echo "{\"type\": \"Namespace\", \"link\": \""; |
225
|
|
|
echo $this->env->getExtension('sami')->pathForNamespace($context, $context["ns"]); |
226
|
|
|
echo "\", \"name\": \""; |
227
|
|
|
echo twig_replace_filter($context["ns"], array("\\" => "\\\\")); |
228
|
|
|
echo "\", \"doc\": \"Namespace "; |
229
|
|
|
echo twig_replace_filter($context["ns"], array("\\" => "\\\\")); |
230
|
|
|
echo "\"},"; |
231
|
|
|
} |
232
|
|
|
$_parent = $context['_parent']; |
233
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ns'], $context['_parent'], $context['loop']); |
234
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
235
|
|
|
// line 25 |
236
|
|
|
echo " |
237
|
|
|
"; |
238
|
|
|
// line 26 |
239
|
|
|
$context['_parent'] = $context; |
240
|
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["interfaces"]) ? $context["interfaces"] : $this->getContext($context, "interfaces"))); |
241
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["class"]) { |
242
|
|
|
// line 27 |
243
|
|
|
echo "{\"type\": \"Interface\", "; |
244
|
|
View Code Duplication |
if ($this->getAttribute($context["class"], "namespace", array())) { |
|
|
|
|
245
|
|
|
echo "\"fromName\": \""; |
246
|
|
|
echo twig_replace_filter($this->getAttribute($context["class"], "namespace", array()), array("\\" => "\\\\")); |
247
|
|
|
echo "\", \"fromLink\": \""; |
248
|
|
|
echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["class"], "namespace", array())); |
249
|
|
|
echo "\","; |
250
|
|
|
} |
251
|
|
|
echo " \"link\": \""; |
252
|
|
|
echo $this->env->getExtension('sami')->pathForClass($context, $context["class"]); |
253
|
|
|
echo "\", \"name\": \""; |
254
|
|
|
echo twig_replace_filter($this->getAttribute($context["class"], "name", array()), array("\\" => "\\\\")); |
255
|
|
|
echo "\", \"doc\": \""; |
256
|
|
|
echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"])), "html", null, true); |
257
|
|
|
echo "\"}, |
258
|
|
|
"; |
259
|
|
|
// line 28 |
260
|
|
|
echo $context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"]->getadd_class_methods_index($context["class"]); |
261
|
|
|
echo " |
262
|
|
|
"; |
263
|
|
|
} |
264
|
|
|
$_parent = $context['_parent']; |
265
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']); |
266
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
267
|
|
|
// line 30 |
268
|
|
|
echo " |
269
|
|
|
"; |
270
|
|
|
// line 31 |
271
|
|
|
$context['_parent'] = $context; |
272
|
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["classes"]) ? $context["classes"] : $this->getContext($context, "classes"))); |
273
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["class"]) { |
274
|
|
|
// line 32 |
275
|
|
|
echo "{\"type\": "; |
276
|
|
|
if ($this->getAttribute($context["class"], "isTrait", array())) { |
277
|
|
|
echo "\"Trait\""; |
278
|
|
|
} else { |
279
|
|
|
echo "\"Class\""; |
280
|
|
|
} |
281
|
|
|
echo ", "; |
282
|
|
View Code Duplication |
if ($this->getAttribute($context["class"], "namespace", array())) { |
|
|
|
|
283
|
|
|
echo "\"fromName\": \""; |
284
|
|
|
echo twig_replace_filter($this->getAttribute($context["class"], "namespace", array()), array("\\" => "\\\\")); |
285
|
|
|
echo "\", \"fromLink\": \""; |
286
|
|
|
echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["class"], "namespace", array())); |
287
|
|
|
echo "\","; |
288
|
|
|
} |
289
|
|
|
echo " \"link\": \""; |
290
|
|
|
echo $this->env->getExtension('sami')->pathForClass($context, $context["class"]); |
291
|
|
|
echo "\", \"name\": \""; |
292
|
|
|
echo twig_replace_filter($this->getAttribute($context["class"], "name", array()), array("\\" => "\\\\")); |
293
|
|
|
echo "\", \"doc\": \""; |
294
|
|
|
echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["class"], "shortdesc", array()), $context["class"])), "html", null, true); |
295
|
|
|
echo "\"}, |
296
|
|
|
"; |
297
|
|
|
// line 33 |
298
|
|
|
echo $context["__internal_fec9f14ad72298db06597a5026d98ea3d54ffe884d2fe9be935abccf0d16efba"]->getadd_class_methods_index($context["class"]); |
299
|
|
|
echo " |
300
|
|
|
"; |
301
|
|
|
} |
302
|
|
|
$_parent = $context['_parent']; |
303
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']); |
304
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
305
|
|
|
// line 35 |
306
|
|
|
echo " |
307
|
|
|
"; |
308
|
|
|
// line 37 |
309
|
|
|
echo " "; |
310
|
|
|
$this->displayBlock('search_index_extra', $context, $blocks); |
311
|
|
|
// line 38 |
312
|
|
|
echo " "; |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
// line 37 |
316
|
|
|
public function block_search_index_extra($context, array $blocks = array()) |
|
|
|
|
317
|
|
|
{ |
318
|
|
|
echo ""; |
319
|
|
|
} |
320
|
|
|
|
321
|
|
|
// line 156 |
322
|
|
|
public function block_treejs($context, array $blocks = array()) |
|
|
|
|
323
|
|
|
{ |
324
|
|
|
// line 157 |
325
|
|
|
echo " |
326
|
|
|
// Toggle left-nav divs on click |
327
|
|
|
\$('#api-tree .hd span').click(function() { |
328
|
|
|
\$(this).parent().parent().toggleClass('opened'); |
329
|
|
|
}); |
330
|
|
|
|
331
|
|
|
// Expand the parent namespaces of the current page. |
332
|
|
|
var expected = \$('body').attr('data-name'); |
333
|
|
|
|
334
|
|
|
if (expected) { |
335
|
|
|
// Open the currently selected node and its parents. |
336
|
|
|
var container = \$('#api-tree'); |
337
|
|
|
var node = \$('#api-tree li[data-name=\"' + expected + '\"]'); |
338
|
|
|
// Node might not be found when simulating namespaces |
339
|
|
|
if (node.length > 0) { |
340
|
|
|
node.addClass('active').addClass('opened'); |
341
|
|
|
node.parents('li').addClass('opened'); |
342
|
|
|
var scrollPos = node.offset().top - container.offset().top + container.scrollTop(); |
343
|
|
|
// Position the item nearer to the top of the screen. |
344
|
|
|
scrollPos -= 200; |
345
|
|
|
container.scrollTop(scrollPos); |
346
|
|
|
} |
347
|
|
|
} |
348
|
|
|
|
349
|
|
|
"; |
350
|
|
|
} |
351
|
|
|
|
352
|
|
|
// line 213 |
353
|
|
|
public function getadd_class_methods_index($__class__ = null, ...$__varargs__) |
|
|
|
|
354
|
|
|
{ |
355
|
|
|
$context = $this->env->mergeGlobals(array( |
356
|
|
|
"class" => $__class__, |
357
|
|
|
"varargs" => $__varargs__, |
358
|
|
|
)); |
359
|
|
|
|
360
|
|
|
$blocks = array(); |
|
|
|
|
361
|
|
|
|
362
|
|
|
ob_start(); |
363
|
|
|
try { |
364
|
|
|
// line 214 |
365
|
|
|
echo " "; |
366
|
|
|
if ($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "methods", array())) { |
367
|
|
|
// line 215 |
368
|
|
|
echo " "; |
369
|
|
|
$context["from_name"] = twig_replace_filter($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "name", array()), array("\\" => "\\\\")); |
370
|
|
|
// line 216 |
371
|
|
|
echo " "; |
372
|
|
|
$context["from_link"] = $this->env->getExtension('sami')->pathForClass($context, (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"))); |
373
|
|
|
// line 217 |
374
|
|
|
echo " "; |
375
|
|
|
$context['_parent'] = $context; |
376
|
|
|
$context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")), "methods", array())); |
377
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["meth"]) { |
378
|
|
|
// line 218 |
379
|
|
|
echo " {\"type\": \"Method\", \"fromName\": \""; |
380
|
|
|
echo (isset($context["from_name"]) ? $context["from_name"] : $this->getContext($context, "from_name")); |
381
|
|
|
echo "\", \"fromLink\": \""; |
382
|
|
|
echo (isset($context["from_link"]) ? $context["from_link"] : $this->getContext($context, "from_link")); |
383
|
|
|
echo "\", \"link\": \""; |
384
|
|
|
echo $this->env->getExtension('sami')->pathForMethod($context, $context["meth"]); |
385
|
|
|
echo "\", \"name\": \""; |
386
|
|
|
echo twig_replace_filter($context["meth"], array("\\" => "\\\\")); |
387
|
|
|
echo "\", \"doc\": \""; |
388
|
|
|
echo twig_escape_filter($this->env, twig_jsonencode_filter($this->env->getExtension('sami')->parseDesc($context, $this->getAttribute($context["meth"], "shortdesc", array()), (isset($context["class"]) ? $context["class"] : $this->getContext($context, "class")))), "html", null, true); |
389
|
|
|
echo "\"}, |
390
|
|
|
"; |
391
|
|
|
} |
392
|
|
|
$_parent = $context['_parent']; |
393
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['meth'], $context['_parent'], $context['loop']); |
394
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
|
|
|
|
395
|
|
|
// line 220 |
396
|
|
|
echo " "; |
397
|
|
|
} |
398
|
|
|
} catch (Exception $e) { |
399
|
|
|
ob_end_clean(); |
400
|
|
|
|
401
|
|
|
throw $e; |
402
|
|
|
} catch (Throwable $e) { |
|
|
|
|
403
|
|
|
ob_end_clean(); |
404
|
|
|
|
405
|
|
|
throw $e; |
406
|
|
|
} |
407
|
|
|
|
408
|
|
|
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
// line 223 |
412
|
|
|
public function getelement($__tree__ = null, $__opened__ = null, $__depth__ = null, ...$__varargs__) |
413
|
|
|
{ |
414
|
|
|
$context = $this->env->mergeGlobals(array( |
415
|
|
|
"tree" => $__tree__, |
416
|
|
|
"opened" => $__opened__, |
417
|
|
|
"depth" => $__depth__, |
418
|
|
|
"varargs" => $__varargs__, |
419
|
|
|
)); |
420
|
|
|
|
421
|
|
|
$blocks = array(); |
|
|
|
|
422
|
|
|
|
423
|
|
|
ob_start(); |
424
|
|
|
try { |
425
|
|
|
// line 224 |
426
|
|
|
echo " "; |
427
|
|
|
$context["__internal_203852106d81b21fad240b3e53ecbd07d6dc0c94215c15f2799adb4e5d97d8fa"] = $this; |
428
|
|
|
// line 225 |
429
|
|
|
echo " |
430
|
|
|
<ul>"; |
431
|
|
|
// line 227 |
432
|
|
|
$context['_parent'] = $context; |
433
|
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["tree"]) ? $context["tree"] : $this->getContext($context, "tree"))); |
434
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["element"]) { |
435
|
|
|
// line 228 |
436
|
|
|
if ($this->getAttribute($context["element"], 2, array(), "array")) { |
437
|
|
|
// line 229 |
438
|
|
|
echo " <li data-name=\"namespace:"; |
439
|
|
|
echo twig_replace_filter($this->getAttribute($context["element"], 1, array(), "array"), array("\\" => "_")); |
440
|
|
|
echo "\" "; |
441
|
|
View Code Duplication |
if (((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) < (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")))) { |
|
|
|
|
442
|
|
|
echo "class=\"opened\""; |
443
|
|
|
} |
444
|
|
|
echo "> |
445
|
|
|
<div style=\"padding-left:"; |
446
|
|
|
// line 230 |
447
|
|
|
echo ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) * 18); |
448
|
|
|
echo "px\" class=\"hd\"> |
449
|
|
|
<span class=\"glyphicon glyphicon-play\"></span>"; |
450
|
|
|
// line 231 |
451
|
|
View Code Duplication |
if ( !$this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "simulate_namespaces"), "method")) { |
|
|
|
|
452
|
|
|
echo "<a href=\""; |
453
|
|
|
echo $this->env->getExtension('sami')->pathForNamespace($context, $this->getAttribute($context["element"], 1, array(), "array")); |
454
|
|
|
echo "\">"; |
455
|
|
|
} |
456
|
|
|
echo $this->getAttribute($context["element"], 0, array(), "array"); |
457
|
|
|
if ( !$this->getAttribute((isset($context["project"]) ? $context["project"] : $this->getContext($context, "project")), "config", array(0 => "simulate_namespaces"), "method")) { |
458
|
|
|
echo "</a>"; |
459
|
|
|
} |
460
|
|
|
// line 232 |
461
|
|
|
echo " </div> |
462
|
|
|
<div class=\"bd\"> |
463
|
|
|
"; |
464
|
|
|
// line 234 |
465
|
|
|
echo $context["__internal_203852106d81b21fad240b3e53ecbd07d6dc0c94215c15f2799adb4e5d97d8fa"]->getelement($this->getAttribute($context["element"], 2, array(), "array"), (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")), ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) + 1)); |
466
|
|
|
// line 235 |
467
|
|
|
echo "</div> |
468
|
|
|
</li> |
469
|
|
|
"; |
470
|
|
|
} else { |
471
|
|
|
// line 238 |
472
|
|
|
echo " <li data-name=\"class:"; |
473
|
|
|
echo twig_escape_filter($this->env, twig_replace_filter($this->getAttribute($this->getAttribute($context["element"], 1, array(), "array"), "name", array()), array("\\" => "_")), "html", null, true); |
474
|
|
|
echo "\" "; |
475
|
|
View Code Duplication |
if (((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) < (isset($context["opened"]) ? $context["opened"] : $this->getContext($context, "opened")))) { |
|
|
|
|
476
|
|
|
echo "class=\"opened\""; |
477
|
|
|
} |
478
|
|
|
echo "> |
479
|
|
|
<div style=\"padding-left:"; |
480
|
|
|
// line 239 |
481
|
|
|
echo twig_escape_filter($this->env, (8 + ((isset($context["depth"]) ? $context["depth"] : $this->getContext($context, "depth")) * 18)), "html", null, true); |
482
|
|
|
echo "px\" class=\"hd leaf\"> |
483
|
|
|
<a href=\""; |
484
|
|
|
// line 240 |
485
|
|
|
echo $this->env->getExtension('sami')->pathForClass($context, $this->getAttribute($context["element"], 1, array(), "array")); |
486
|
|
|
echo "\">"; |
487
|
|
|
echo twig_escape_filter($this->env, $this->getAttribute($context["element"], 0, array(), "array"), "html", null, true); |
488
|
|
|
echo "</a> |
489
|
|
|
</div> |
490
|
|
|
</li> |
491
|
|
|
"; |
492
|
|
|
} |
493
|
|
|
} |
494
|
|
|
$_parent = $context['_parent']; |
495
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']); |
496
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
|
|
|
|
497
|
|
|
// line 245 |
498
|
|
|
echo " </ul> |
499
|
|
|
"; |
500
|
|
|
} catch (Exception $e) { |
501
|
|
|
ob_end_clean(); |
502
|
|
|
|
503
|
|
|
throw $e; |
504
|
|
|
} catch (Throwable $e) { |
|
|
|
|
505
|
|
|
ob_end_clean(); |
506
|
|
|
|
507
|
|
|
throw $e; |
508
|
|
|
} |
509
|
|
|
|
510
|
|
|
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); |
511
|
|
|
} |
512
|
|
|
|
513
|
|
|
public function getTemplateName() |
514
|
|
|
{ |
515
|
|
|
return "sami.js.twig"; |
516
|
|
|
} |
517
|
|
|
|
518
|
|
|
public function isTraitable() |
519
|
|
|
{ |
520
|
|
|
return false; |
521
|
|
|
} |
522
|
|
|
|
523
|
|
|
public function getDebugInfo() |
524
|
|
|
{ |
525
|
|
|
return array ( 498 => 245, 485 => 240, 481 => 239, 472 => 238, 467 => 235, 465 => 234, 461 => 232, 451 => 231, 447 => 230, 438 => 229, 436 => 228, 432 => 227, 429 => 225, 426 => 224, 412 => 223, 396 => 220, 379 => 218, 374 => 217, 371 => 216, 368 => 215, 365 => 214, 353 => 213, 325 => 157, 322 => 156, 316 => 37, 312 => 38, 309 => 37, 306 => 35, 298 => 33, 275 => 32, 271 => 31, 268 => 30, 260 => 28, 243 => 27, 239 => 26, 236 => 25, 224 => 23, 220 => 22, 217 => 21, 214 => 20, 211 => 19, 206 => 222, 173 => 210, 170 => 182, 168 => 156, 49 => 39, 47 => 19, 31 => 7, 24 => 2, 22 => 1,); |
526
|
|
|
} |
527
|
|
|
} |
528
|
|
|
/* {% from _self import element %}*/ |
529
|
|
|
/* */ |
530
|
|
|
/* (function(root) {*/ |
|
|
|
|
531
|
|
|
/* */ |
532
|
|
|
/* var bhIndex = null;*/ |
533
|
|
|
/* var rootPath = '';*/ |
534
|
|
|
/* var treeHtml = '{{ element(tree, project.config('default_opened_level'), 0)|replace({"'": "\\'", "\n": ''})|raw }}';*/ |
|
|
|
|
535
|
|
|
/* */ |
536
|
|
|
/* var searchTypeClasses = {*/ |
537
|
|
|
/* 'Namespace': 'label-default',*/ |
|
|
|
|
538
|
|
|
/* 'Class': 'label-info',*/ |
|
|
|
|
539
|
|
|
/* 'Interface': 'label-primary',*/ |
|
|
|
|
540
|
|
|
/* 'Trait': 'label-success',*/ |
|
|
|
|
541
|
|
|
/* 'Method': 'label-danger',*/ |
|
|
|
|
542
|
|
|
/* '_': 'label-warning'*/ |
543
|
|
|
/* };*/ |
544
|
|
|
/* */ |
545
|
|
|
/* var searchIndex = [*/ |
546
|
|
|
/* {% block search_index %}*/ |
547
|
|
|
/* {% from _self import add_class_methods_index %}*/ |
548
|
|
|
/* */ |
549
|
|
|
/* {% for ns in namespaces -%}*/ |
550
|
|
|
/* {"type": "Namespace", "link": "{{ namespace_path(ns) }}", "name": "{{ ns|replace({'\\': '\\\\'})|raw }}", "doc": "Namespace {{ ns|replace({'\\': '\\\\'})|raw }}"},*/ |
|
|
|
|
551
|
|
|
/* {%- endfor %}*/ |
552
|
|
|
/* */ |
553
|
|
|
/* {% for class in interfaces -%}*/ |
554
|
|
|
/* {"type": "Interface", {% if class.namespace %}"fromName": "{{ class.namespace|replace({'\\': '\\\\'})|raw }}", "fromLink": "{{ namespace_path(class.namespace)|raw }}",{% endif %} "link": "{{ class_path(class) }}", "name": "{{ class.name|replace({'\\': '\\\\'})|raw }}", "doc": "{{ class.shortdesc|desc(class)|json_encode }}"},*/ |
|
|
|
|
555
|
|
|
/* {{ add_class_methods_index(class) }}*/ |
|
|
|
|
556
|
|
|
/* {% endfor %}*/ |
|
|
|
|
557
|
|
|
/* */ |
558
|
|
|
/* {% for class in classes -%}*/ |
559
|
|
|
/* {"type": {% if class.isTrait %}"Trait"{% else %}"Class"{% endif %}, {% if class.namespace %}"fromName": "{{ class.namespace|replace({'\\': '\\\\'})|raw }}", "fromLink": "{{ namespace_path(class.namespace) }}",{% endif %} "link": "{{ class_path(class) }}", "name": "{{ class.name|replace({'\\': '\\\\'})|raw }}", "doc": "{{ class.shortdesc|desc(class)|json_encode }}"},*/ |
|
|
|
|
560
|
|
|
/* {{ add_class_methods_index(class) }}*/ |
|
|
|
|
561
|
|
|
/* {% endfor %}*/ |
|
|
|
|
562
|
|
|
/* */ |
563
|
|
|
/* {# Override this block, search_index_extra, to add custom search entries! #}*/ |
564
|
|
|
/* {% block search_index_extra '' %}*/ |
565
|
|
|
/* {% endblock %}*/ |
566
|
|
|
/* // Fix trailing commas in the index*/ |
567
|
|
|
/* {}*/ |
568
|
|
|
/* ];*/ |
569
|
|
|
/* */ |
570
|
|
|
/* /** Tokenizes strings by namespaces and functions *//* */ |
571
|
|
|
/* function tokenizer(term) {*/ |
|
|
|
|
572
|
|
|
/* if (!term) {*/ |
|
|
|
|
573
|
|
|
/* return [];*/ |
|
|
|
|
574
|
|
|
/* }*/ |
575
|
|
|
/* */ |
576
|
|
|
/* var tokens = [term];*/ |
|
|
|
|
577
|
|
|
/* var meth = term.indexOf('::');*/ |
|
|
|
|
578
|
|
|
/* */ |
579
|
|
|
/* // Split tokens into methods if "::" is found.*/ |
580
|
|
|
/* if (meth > -1) {*/ |
|
|
|
|
581
|
|
|
/* tokens.push(term.substr(meth + 2));*/ |
|
|
|
|
582
|
|
|
/* term = term.substr(0, meth - 2);*/ |
583
|
|
|
/* }*/ |
584
|
|
|
/* */ |
585
|
|
|
/* // Split by namespace or fake namespace.*/ |
586
|
|
|
/* if (term.indexOf('\\') > -1) {*/ |
|
|
|
|
587
|
|
|
/* tokens = tokens.concat(term.split('\\'));*/ |
|
|
|
|
588
|
|
|
/* } else if (term.indexOf('_') > 0) {*/ |
|
|
|
|
589
|
|
|
/* tokens = tokens.concat(term.split('_'));*/ |
|
|
|
|
590
|
|
|
/* }*/ |
591
|
|
|
/* */ |
592
|
|
|
/* // Merge in splitting the string by case and return*/ |
593
|
|
|
/* tokens = tokens.concat(term.match(/(([A-Z]?[^A-Z]*)|([a-z]?[^a-z]*))/g).slice(0,-1));*/ |
|
|
|
|
594
|
|
|
/* */ |
595
|
|
|
/* return tokens;*/ |
596
|
|
|
/* };*/ |
597
|
|
|
/* */ |
598
|
|
|
/* root.Sami = {*/ |
599
|
|
|
/* /***/ |
600
|
|
|
/* * Cleans the provided term. If no term is provided, then one is*/ |
601
|
|
|
/* * grabbed from the query string "search" parameter.*/ |
602
|
|
|
/* *//* */ |
603
|
|
|
/* cleanSearchTerm: function(term) {*/ |
|
|
|
|
604
|
|
|
/* // Grab from the query string*/ |
605
|
|
|
/* if (typeof term === 'undefined') {*/ |
|
|
|
|
606
|
|
|
/* var name = 'search';*/ |
607
|
|
|
/* var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");*/ |
608
|
|
|
/* var results = regex.exec(location.search);*/ |
609
|
|
|
/* if (results === null) {*/ |
|
|
|
|
610
|
|
|
/* return null;*/ |
611
|
|
|
/* }*/ |
612
|
|
|
/* term = decodeURIComponent(results[1].replace(/\+/g, " "));*/ |
|
|
|
|
613
|
|
|
/* }*/ |
614
|
|
|
/* */ |
615
|
|
|
/* return term.replace(/<(?:.|\n)*?>/gm, '');*/ |
616
|
|
|
/* },*/ |
617
|
|
|
/* */ |
618
|
|
|
/* /** Searches through the index for a given term *//* */ |
619
|
|
|
/* search: function(term) {*/ |
|
|
|
|
620
|
|
|
/* // Create a new search index if needed*/ |
621
|
|
|
/* if (!bhIndex) {*/ |
|
|
|
|
622
|
|
|
/* bhIndex = new Bloodhound({*/ |
623
|
|
|
/* limit: 500,*/ |
624
|
|
|
/* local: searchIndex,*/ |
625
|
|
|
/* datumTokenizer: function (d) {*/ |
|
|
|
|
626
|
|
|
/* return tokenizer(d.name);*/ |
|
|
|
|
627
|
|
|
/* },*/ |
628
|
|
|
/* queryTokenizer: Bloodhound.tokenizers.whitespace*/ |
629
|
|
|
/* });*/ |
630
|
|
|
/* bhIndex.initialize();*/ |
|
|
|
|
631
|
|
|
/* }*/ |
632
|
|
|
/* */ |
633
|
|
|
/* results = [];*/ |
|
|
|
|
634
|
|
|
/* bhIndex.get(term, function(matches) {*/ |
|
|
|
|
635
|
|
|
/* results = matches;*/ |
636
|
|
|
/* });*/ |
637
|
|
|
/* */ |
638
|
|
|
/* if (!rootPath) {*/ |
|
|
|
|
639
|
|
|
/* return results;*/ |
640
|
|
|
/* }*/ |
641
|
|
|
/* */ |
642
|
|
|
/* // Fix the element links based on the current page depth.*/ |
643
|
|
|
/* return $.map(results, function(ele) {*/ |
|
|
|
|
644
|
|
|
/* if (ele.link.indexOf('..') > -1) {*/ |
|
|
|
|
645
|
|
|
/* return ele;*/ |
646
|
|
|
/* }*/ |
647
|
|
|
/* ele.link = rootPath + ele.link;*/ |
648
|
|
|
/* if (ele.fromLink) {*/ |
|
|
|
|
649
|
|
|
/* ele.fromLink = rootPath + ele.fromLink;*/ |
650
|
|
|
/* }*/ |
651
|
|
|
/* return ele;*/ |
652
|
|
|
/* });*/ |
653
|
|
|
/* },*/ |
654
|
|
|
/* */ |
655
|
|
|
/* /** Get a search class for a specific type *//* */ |
656
|
|
|
/* getSearchClass: function(type) {*/ |
|
|
|
|
657
|
|
|
/* return searchTypeClasses[type] || searchTypeClasses['_'];*/ |
|
|
|
|
658
|
|
|
/* },*/ |
659
|
|
|
/* */ |
660
|
|
|
/* /** Add the left-nav tree to the site *//* */ |
661
|
|
|
/* injectApiTree: function(ele) {*/ |
|
|
|
|
662
|
|
|
/* ele.html(treeHtml);*/ |
|
|
|
|
663
|
|
|
/* }*/ |
664
|
|
|
/* };*/ |
665
|
|
|
/* */ |
666
|
|
|
/* $(function() {*/ |
|
|
|
|
667
|
|
|
/* // Modify the HTML to work correctly based on the current depth*/ |
668
|
|
|
/* rootPath = $('body').attr('data-root-path');*/ |
|
|
|
|
669
|
|
|
/* treeHtml = treeHtml.replace(/href="/g, 'href="' + rootPath);*/ |
670
|
|
|
/* Sami.injectApiTree($('#api-tree'));*/ |
|
|
|
|
671
|
|
|
/* });*/ |
672
|
|
|
/* */ |
673
|
|
|
/* return root.Sami;*/ |
674
|
|
|
/* })(window);*/ |
|
|
|
|
675
|
|
|
/* */ |
676
|
|
|
/* $(function() {*/ |
|
|
|
|
677
|
|
|
/* */ |
678
|
|
|
/* // Enable the version switcher*/ |
679
|
|
|
/* $('#version-switcher').change(function() {*/ |
|
|
|
|
680
|
|
|
/* window.location = $(this).val()*/ |
681
|
|
|
/* });*/ |
682
|
|
|
/* */ |
683
|
|
|
/* {% block treejs %}*/ |
684
|
|
|
/* */ |
685
|
|
|
/* // Toggle left-nav divs on click*/ |
686
|
|
|
/* $('#api-tree .hd span').click(function() {*/ |
|
|
|
|
687
|
|
|
/* $(this).parent().parent().toggleClass('opened');*/ |
|
|
|
|
688
|
|
|
/* });*/ |
689
|
|
|
/* */ |
690
|
|
|
/* // Expand the parent namespaces of the current page.*/ |
691
|
|
|
/* var expected = $('body').attr('data-name');*/ |
|
|
|
|
692
|
|
|
/* */ |
693
|
|
|
/* if (expected) {*/ |
|
|
|
|
694
|
|
|
/* // Open the currently selected node and its parents.*/ |
695
|
|
|
/* var container = $('#api-tree');*/ |
|
|
|
|
696
|
|
|
/* var node = $('#api-tree li[data-name="' + expected + '"]');*/ |
697
|
|
|
/* // Node might not be found when simulating namespaces*/ |
698
|
|
|
/* if (node.length > 0) {*/ |
|
|
|
|
699
|
|
|
/* node.addClass('active').addClass('opened');*/ |
|
|
|
|
700
|
|
|
/* node.parents('li').addClass('opened');*/ |
|
|
|
|
701
|
|
|
/* var scrollPos = node.offset().top - container.offset().top + container.scrollTop();*/ |
702
|
|
|
/* // Position the item nearer to the top of the screen.*/ |
703
|
|
|
/* scrollPos -= 200;*/ |
704
|
|
|
/* container.scrollTop(scrollPos);*/ |
|
|
|
|
705
|
|
|
/* }*/ |
706
|
|
|
/* }*/ |
707
|
|
|
/* */ |
708
|
|
|
/* {% endblock %}*/ |
709
|
|
|
/* */ |
710
|
|
|
/* {% verbatim %}*/ |
711
|
|
|
/* var form = $('#search-form .typeahead');*/ |
|
|
|
|
712
|
|
|
/* form.typeahead({*/ |
713
|
|
|
/* hint: true,*/ |
714
|
|
|
/* highlight: true,*/ |
715
|
|
|
/* minLength: 1*/ |
716
|
|
|
/* }, {*/ |
717
|
|
|
/* name: 'search',*/ |
718
|
|
|
/* displayKey: 'name',*/ |
719
|
|
|
/* source: function (q, cb) {*/ |
|
|
|
|
720
|
|
|
/* cb(Sami.search(q));*/ |
|
|
|
|
721
|
|
|
/* }*/ |
722
|
|
|
/* });*/ |
723
|
|
|
/* */ |
724
|
|
|
/* // The selection is direct-linked when the user selects a suggestion.*/ |
725
|
|
|
/* form.on('typeahead:selected', function(e, suggestion) {*/ |
|
|
|
|
726
|
|
|
/* window.location = suggestion.link;*/ |
727
|
|
|
/* });*/ |
728
|
|
|
/* */ |
729
|
|
|
/* // The form is submitted when the user hits enter.*/ |
730
|
|
|
/* form.keypress(function (e) {*/ |
|
|
|
|
731
|
|
|
/* if (e.which == 13) {*/ |
|
|
|
|
732
|
|
|
/* $('#search-form').submit();*/ |
|
|
|
|
733
|
|
|
/* return true;*/ |
734
|
|
|
/* }*/ |
735
|
|
|
/* });*/ |
736
|
|
|
/* */ |
737
|
|
|
/* {% endverbatim %}*/ |
738
|
|
|
/* });*/ |
739
|
|
|
/* */ |
740
|
|
|
/* {% macro add_class_methods_index(class) %}*/ |
|
|
|
|
741
|
|
|
/* {% if class.methods %}*/ |
742
|
|
|
/* {% set from_name = class.name|replace({'\\': '\\\\'}) %}*/ |
|
|
|
|
743
|
|
|
/* {% set from_link = class_path(class) %}*/ |
744
|
|
|
/* {% for meth in class.methods %}*/ |
745
|
|
|
/* {"type": "Method", "fromName": "{{ from_name|raw }}", "fromLink": "{{ from_link|raw }}", "link": "{{ method_path(meth) }}", "name": "{{ meth|replace({'\\': '\\\\'})|raw }}", "doc": "{{ meth.shortdesc|desc(class)|json_encode }}"},*/ |
|
|
|
|
746
|
|
|
/* {% endfor %}*/ |
|
|
|
|
747
|
|
|
/* {% endif %}*/ |
|
|
|
|
748
|
|
|
/* {% endmacro %}*/ |
749
|
|
|
/* */ |
750
|
|
|
/* {% macro element(tree, opened, depth) %}*/ |
751
|
|
|
/* {% from _self import element %}*/ |
752
|
|
|
/* */ |
753
|
|
|
/* <ul>*/ |
754
|
|
|
/* {%- for element in tree -%}*/ |
755
|
|
|
/* {% if element[2] %}*/ |
|
|
|
|
756
|
|
|
/* <li data-name="namespace:{{ element[1]|replace({'\\': '_'})|raw }}" {% if depth < opened %}class="opened"{% endif %}>*/ |
757
|
|
|
/* <div style="padding-left:{{ (depth * 18)|raw }}px" class="hd">*/ |
758
|
|
|
/* <span class="glyphicon glyphicon-play"></span>{% if not project.config('simulate_namespaces') %}<a href="{{ namespace_path(element[1]) }}">{% endif %}{{ element[0]|raw }}{% if not project.config('simulate_namespaces') %}</a>{% endif %}*/ |
|
|
|
|
759
|
|
|
/* </div>*/ |
760
|
|
|
/* <div class="bd">*/ |
761
|
|
|
/* {{ element(element[2], opened, depth + 1) -}}*/ |
|
|
|
|
762
|
|
|
/* </div>*/ |
763
|
|
|
/* </li>*/ |
764
|
|
|
/* {% else %}*/ |
|
|
|
|
765
|
|
|
/* <li data-name="class:{{ (element[1].name)|replace({'\\': '_'}) }}" {% if depth < opened %}class="opened"{% endif %}>*/ |
766
|
|
|
/* <div style="padding-left:{{ 8 + (depth * 18) }}px" class="hd leaf">*/ |
767
|
|
|
/* <a href="{{ class_path(element[1]) }}">{{ element[0] }}</a>*/ |
|
|
|
|
768
|
|
|
/* </div>*/ |
769
|
|
|
/* </li>*/ |
770
|
|
|
/* {% endif %}*/ |
|
|
|
|
771
|
|
|
/* {%- endfor %}*/ |
772
|
|
|
/* </ul>*/ |
773
|
|
|
/* {% endmacro %}*/ |
774
|
|
|
/* */ |
775
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.