-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsami.js
350 lines (279 loc) · 55.3 KB
/
sami.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
window.projectVersion = 'master';
(function(root) {
var bhIndex = null;
var rootPath = '';
var treeHtml = ' <ul> <li data-name="namespace:phootwork" class="opened"> <div style="padding-left:0px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork.html">phootwork</a> </div> <div class="bd"> <ul> <li data-name="namespace:phootwork_collection" class="opened"> <div style="padding-left:18px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/collection.html">collection</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_collection_Collection" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/collection/Collection.html">Collection</a> </div> </li> </ul></div> </li> <li data-name="namespace:phootwork_file" class="opened"> <div style="padding-left:18px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/file.html">file</a> </div> <div class="bd"> <ul> <li data-name="namespace:phootwork_file_exception" > <div style="padding-left:36px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/file/exception.html">exception</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_file_exception_FileException" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/file/exception/FileException.html">FileException</a> </div> </li> <li data-name="class:phootwork_file_exception_FileNotFoundException" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/file/exception/FileNotFoundException.html">FileNotFoundException</a> </div> </li> </ul></div> </li> </ul></div> </li> <li data-name="namespace:phootwork_lang" class="opened"> <div style="padding-left:18px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/lang.html">lang</a> </div> <div class="bd"> <ul> <li data-name="namespace:phootwork_lang_inflector" > <div style="padding-left:36px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/lang/inflector.html">inflector</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_lang_inflector_InflectorInterface" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/inflector/InflectorInterface.html">InflectorInterface</a> </div> </li> </ul></div> </li> <li data-name="namespace:phootwork_lang_parts" > <div style="padding-left:36px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/lang/parts.html">parts</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_lang_parts_AddPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/AddPart.html">AddPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_ArrayConversionsPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/ArrayConversionsPart.html">ArrayConversionsPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_CheckerPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/CheckerPart.html">CheckerPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_EachPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/EachPart.html">EachPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_InternalPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/InternalPart.html">InternalPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_PopPart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/PopPart.html">PopPart</a> </div> </li> <li data-name="class:phootwork_lang_parts_ReducePart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/ReducePart.html">ReducePart</a> </div> </li> <li data-name="class:phootwork_lang_parts_RemovePart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/RemovePart.html">RemovePart</a> </div> </li> <li data-name="class:phootwork_lang_parts_ReversePart" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/lang/parts/ReversePart.html">ReversePart</a> </div> </li> </ul></div> </li> <li data-name="class:phootwork_lang_ArrayObject" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/ArrayObject.html">ArrayObject</a> </div> </li> <li data-name="class:phootwork_lang_Arrayable" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/Arrayable.html">Arrayable</a> </div> </li> <li data-name="class:phootwork_lang_Comparable" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/Comparable.html">Comparable</a> </div> </li> <li data-name="class:phootwork_lang_ComparableComparator" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/ComparableComparator.html">ComparableComparator</a> </div> </li> <li data-name="class:phootwork_lang_Comparator" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/Comparator.html">Comparator</a> </div> </li> <li data-name="class:phootwork_lang_StringComparator" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/lang/StringComparator.html">StringComparator</a> </div> </li> </ul></div> </li> <li data-name="namespace:phootwork_tokenizer" class="opened"> <div style="padding-left:18px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/tokenizer.html">tokenizer</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_tokenizer_PhpTokenizer" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/tokenizer/PhpTokenizer.html">PhpTokenizer</a> </div> </li> <li data-name="class:phootwork_tokenizer_TokenCollection" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/tokenizer/TokenCollection.html">TokenCollection</a> </div> </li> <li data-name="class:phootwork_tokenizer_TokenVisitorInterface" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/tokenizer/TokenVisitorInterface.html">TokenVisitorInterface</a> </div> </li> </ul></div> </li> <li data-name="namespace:phootwork_xml" class="opened"> <div style="padding-left:18px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/xml.html">xml</a> </div> <div class="bd"> <ul> <li data-name="namespace:phootwork_xml_exception" > <div style="padding-left:36px" class="hd"> <span class="glyphicon glyphicon-play"></span><a href="phootwork/xml/exception.html">exception</a> </div> <div class="bd"> <ul> <li data-name="class:phootwork_xml_exception_XmlException" > <div style="padding-left:62px" class="hd leaf"> <a href="phootwork/xml/exception/XmlException.html">XmlException</a> </div> </li> </ul></div> </li> <li data-name="class:phootwork_xml_XmlParserNoopVisitor" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/xml/XmlParserNoopVisitor.html">XmlParserNoopVisitor</a> </div> </li> <li data-name="class:phootwork_xml_XmlParserVisitorInterface" > <div style="padding-left:44px" class="hd leaf"> <a href="phootwork/xml/XmlParserVisitorInterface.html">XmlParserVisitorInterface</a> </div> </li> </ul></div> </li> </ul></div> </li> </ul>';
var searchTypeClasses = {
'Namespace': 'label-default',
'Class': 'label-info',
'Interface': 'label-primary',
'Trait': 'label-success',
'Method': 'label-danger',
'_': 'label-warning'
};
var searchIndex = [
{"type": "Namespace", "link": "phootwork.html", "name": "phootwork", "doc": "Namespace phootwork"},{"type": "Namespace", "link": "phootwork/collection.html", "name": "phootwork\\collection", "doc": "Namespace phootwork\\collection"},{"type": "Namespace", "link": "phootwork/file.html", "name": "phootwork\\file", "doc": "Namespace phootwork\\file"},{"type": "Namespace", "link": "phootwork/file/exception.html", "name": "phootwork\\file\\exception", "doc": "Namespace phootwork\\file\\exception"},{"type": "Namespace", "link": "phootwork/lang.html", "name": "phootwork\\lang", "doc": "Namespace phootwork\\lang"},{"type": "Namespace", "link": "phootwork/lang/inflector.html", "name": "phootwork\\lang\\inflector", "doc": "Namespace phootwork\\lang\\inflector"},{"type": "Namespace", "link": "phootwork/lang/parts.html", "name": "phootwork\\lang\\parts", "doc": "Namespace phootwork\\lang\\parts"},{"type": "Namespace", "link": "phootwork/tokenizer.html", "name": "phootwork\\tokenizer", "doc": "Namespace phootwork\\tokenizer"},{"type": "Namespace", "link": "phootwork/xml.html", "name": "phootwork\\xml", "doc": "Namespace phootwork\\xml"},{"type": "Namespace", "link": "phootwork/xml/exception.html", "name": "phootwork\\xml\\exception", "doc": "Namespace phootwork\\xml\\exception"},
{"type": "Interface", "fromName": "phootwork\\collection", "fromLink": "phootwork/collection.html", "link": "phootwork/collection/Collection.html", "name": "phootwork\\collection\\Collection", "doc": ""Collection interface""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_clear", "name": "phootwork\\collection\\Collection::clear", "doc": ""Resets the collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_isEmpty", "name": "phootwork\\collection\\Collection::isEmpty", "doc": ""Checks whether this collection is empty""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_contains", "name": "phootwork\\collection\\Collection::contains", "doc": ""Checks whether the given element is in this collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_size", "name": "phootwork\\collection\\Collection::size", "doc": ""Returns the amount of elements in this collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_toArray", "name": "phootwork\\collection\\Collection::toArray", "doc": ""Returns the collection as an array""},
{"type": "Interface", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Arrayable.html", "name": "phootwork\\lang\\Arrayable", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Arrayable", "fromLink": "phootwork/lang/Arrayable.html", "link": "phootwork/lang/Arrayable.html#method_toArray", "name": "phootwork\\lang\\Arrayable::toArray", "doc": ""Array representation of the object""},
{"type": "Interface", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Comparable.html", "name": "phootwork\\lang\\Comparable", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Comparable", "fromLink": "phootwork/lang/Comparable.html", "link": "phootwork/lang/Comparable.html#method_compareTo", "name": "phootwork\\lang\\Comparable::compareTo", "doc": ""Compares to another object""},
{"type": "Interface", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Comparator.html", "name": "phootwork\\lang\\Comparator", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Comparator", "fromLink": "phootwork/lang/Comparator.html", "link": "phootwork/lang/Comparator.html#method_compare", "name": "phootwork\\lang\\Comparator::compare", "doc": ""Compares two objects""},
{"type": "Interface", "fromName": "phootwork\\lang\\inflector", "fromLink": "phootwork/lang/inflector.html", "link": "phootwork/lang/inflector/InflectorInterface.html", "name": "phootwork\\lang\\inflector\\InflectorInterface", "doc": ""The generic interface to create a plural form of a name.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_getPluralForm", "name": "phootwork\\lang\\inflector\\InflectorInterface::getPluralForm", "doc": ""Generate a plural name based on the passed in root.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_getSingularForm", "name": "phootwork\\lang\\inflector\\InflectorInterface::getSingularForm", "doc": ""Generate a singular name based on the passed in root.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_isPlural", "name": "phootwork\\lang\\inflector\\InflectorInterface::isPlural", "doc": ""Check if $root word is plural.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_isSingular", "name": "phootwork\\lang\\inflector\\InflectorInterface::isSingular", "doc": ""Check if $root word is singular.""},
{"type": "Interface", "fromName": "phootwork\\tokenizer", "fromLink": "phootwork/tokenizer.html", "link": "phootwork/tokenizer/TokenVisitorInterface.html", "name": "phootwork\\tokenizer\\TokenVisitorInterface", "doc": """"},
{"type": "Method", "fromName": "phootwork\\tokenizer\\TokenVisitorInterface", "fromLink": "phootwork/tokenizer/TokenVisitorInterface.html", "link": "phootwork/tokenizer/TokenVisitorInterface.html#method_visitToken", "name": "phootwork\\tokenizer\\TokenVisitorInterface::visitToken", "doc": """"},
{"type": "Interface", "fromName": "phootwork\\xml", "fromLink": "phootwork/xml.html", "link": "phootwork/xml/XmlParserVisitorInterface.html", "name": "phootwork\\xml\\XmlParserVisitorInterface", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitElementStart", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitElementStart", "doc": ""visits the start of an element""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitElementEnd", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitElementEnd", "doc": ""visits the end of an element""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitCharacterData", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitCharacterData", "doc": ""visits character data""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitProcessingInstruction", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitProcessingInstruction", "doc": ""visits a processing instruction""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitNotationDeclaration", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitNotationDeclaration", "doc": ""visits a notation declaration""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitUnparsedEntityDeclaration", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitUnparsedEntityDeclaration", "doc": ""visits an unparsed entity declaration""},
{"type": "Class", "fromName": "phootwork\\collection", "fromLink": "phootwork/collection.html", "link": "phootwork/collection/Collection.html", "name": "phootwork\\collection\\Collection", "doc": ""Collection interface""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_clear", "name": "phootwork\\collection\\Collection::clear", "doc": ""Resets the collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_isEmpty", "name": "phootwork\\collection\\Collection::isEmpty", "doc": ""Checks whether this collection is empty""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_contains", "name": "phootwork\\collection\\Collection::contains", "doc": ""Checks whether the given element is in this collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_size", "name": "phootwork\\collection\\Collection::size", "doc": ""Returns the amount of elements in this collection""},
{"type": "Method", "fromName": "phootwork\\collection\\Collection", "fromLink": "phootwork/collection/Collection.html", "link": "phootwork/collection/Collection.html#method_toArray", "name": "phootwork\\collection\\Collection::toArray", "doc": ""Returns the collection as an array""},
{"type": "Class", "fromName": "phootwork\\file\\exception", "fromLink": "phootwork/file/exception.html", "link": "phootwork/file/exception/FileException.html", "name": "phootwork\\file\\exception\\FileException", "doc": """"},
{"type": "Class", "fromName": "phootwork\\file\\exception", "fromLink": "phootwork/file/exception.html", "link": "phootwork/file/exception/FileNotFoundException.html", "name": "phootwork\\file\\exception\\FileNotFoundException", "doc": """"},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/ArrayObject.html", "name": "phootwork\\lang\\ArrayObject", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method___construct", "name": "phootwork\\lang\\ArrayObject::__construct", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method___serialize", "name": "phootwork\\lang\\ArrayObject::__serialize", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method___unserialize", "name": "phootwork\\lang\\ArrayObject::__unserialize", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_getIterator", "name": "phootwork\\lang\\ArrayObject::getIterator", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_serialize", "name": "phootwork\\lang\\ArrayObject::serialize", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_unserialize", "name": "phootwork\\lang\\ArrayObject::unserialize", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_clear", "name": "phootwork\\lang\\ArrayObject::clear", "doc": ""Resets the array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_append", "name": "phootwork\\lang\\ArrayObject::append", "doc": ""Append one or more elements onto the end of array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_prepend", "name": "phootwork\\lang\\ArrayObject::prepend", "doc": ""Prepend one or more elements to the beginning of the array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_shift", "name": "phootwork\\lang\\ArrayObject::shift", "doc": ""Shift an element off the beginning of array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_splice", "name": "phootwork\\lang\\ArrayObject::splice", "doc": ""Remove a portion of the array and replace it with something else""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_join", "name": "phootwork\\lang\\ArrayObject::join", "doc": ""Joins the array with a string""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_slice", "name": "phootwork\\lang\\ArrayObject::slice", "doc": ""Extract a slice of the array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_merge", "name": "phootwork\\lang\\ArrayObject::merge", "doc": ""Merges in other values""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_mergeRecursive", "name": "phootwork\\lang\\ArrayObject::mergeRecursive", "doc": ""Merges in other values, recursively""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_keys", "name": "phootwork\\lang\\ArrayObject::keys", "doc": ""Returns the keys of the array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_values", "name": "phootwork\\lang\\ArrayObject::values", "doc": ""Returns the values of the array""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_flip", "name": "phootwork\\lang\\ArrayObject::flip", "doc": ""Flips keys and values""},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_offsetSet", "name": "phootwork\\lang\\ArrayObject::offsetSet", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_offsetExists", "name": "phootwork\\lang\\ArrayObject::offsetExists", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_offsetUnset", "name": "phootwork\\lang\\ArrayObject::offsetUnset", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\ArrayObject", "fromLink": "phootwork/lang/ArrayObject.html", "link": "phootwork/lang/ArrayObject.html#method_offsetGet", "name": "phootwork\\lang\\ArrayObject::offsetGet", "doc": """"},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Arrayable.html", "name": "phootwork\\lang\\Arrayable", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Arrayable", "fromLink": "phootwork/lang/Arrayable.html", "link": "phootwork/lang/Arrayable.html#method_toArray", "name": "phootwork\\lang\\Arrayable::toArray", "doc": ""Array representation of the object""},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Comparable.html", "name": "phootwork\\lang\\Comparable", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Comparable", "fromLink": "phootwork/lang/Comparable.html", "link": "phootwork/lang/Comparable.html#method_compareTo", "name": "phootwork\\lang\\Comparable::compareTo", "doc": ""Compares to another object""},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/ComparableComparator.html", "name": "phootwork\\lang\\ComparableComparator", "doc": ""Class ComparableComparator""},
{"type": "Method", "fromName": "phootwork\\lang\\ComparableComparator", "fromLink": "phootwork/lang/ComparableComparator.html", "link": "phootwork/lang/ComparableComparator.html#method_compare", "name": "phootwork\\lang\\ComparableComparator::compare", "doc": """"},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/Comparator.html", "name": "phootwork\\lang\\Comparator", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\Comparator", "fromLink": "phootwork/lang/Comparator.html", "link": "phootwork/lang/Comparator.html#method_compare", "name": "phootwork\\lang\\Comparator::compare", "doc": ""Compares two objects""},
{"type": "Class", "fromName": "phootwork\\lang", "fromLink": "phootwork/lang.html", "link": "phootwork/lang/StringComparator.html", "name": "phootwork\\lang\\StringComparator", "doc": ""String comparison""},
{"type": "Method", "fromName": "phootwork\\lang\\StringComparator", "fromLink": "phootwork/lang/StringComparator.html", "link": "phootwork/lang/StringComparator.html#method_compare", "name": "phootwork\\lang\\StringComparator::compare", "doc": ""Compares two objects""},
{"type": "Class", "fromName": "phootwork\\lang\\inflector", "fromLink": "phootwork/lang/inflector.html", "link": "phootwork/lang/inflector/InflectorInterface.html", "name": "phootwork\\lang\\inflector\\InflectorInterface", "doc": ""The generic interface to create a plural form of a name.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_getPluralForm", "name": "phootwork\\lang\\inflector\\InflectorInterface::getPluralForm", "doc": ""Generate a plural name based on the passed in root.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_getSingularForm", "name": "phootwork\\lang\\inflector\\InflectorInterface::getSingularForm", "doc": ""Generate a singular name based on the passed in root.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_isPlural", "name": "phootwork\\lang\\inflector\\InflectorInterface::isPlural", "doc": ""Check if $root word is plural.""},
{"type": "Method", "fromName": "phootwork\\lang\\inflector\\InflectorInterface", "fromLink": "phootwork/lang/inflector/InflectorInterface.html", "link": "phootwork/lang/inflector/InflectorInterface.html#method_isSingular", "name": "phootwork\\lang\\inflector\\InflectorInterface::isSingular", "doc": ""Check if $root word is singular.""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/AddPart.html", "name": "phootwork\\lang\\parts\\AddPart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\AddPart", "fromLink": "phootwork/lang/parts/AddPart.html", "link": "phootwork/lang/parts/AddPart.html#method_add", "name": "phootwork\\lang\\parts\\AddPart::add", "doc": ""Adds one or more elements to that array""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/ArrayConversionsPart.html", "name": "phootwork\\lang\\parts\\ArrayConversionsPart", "doc": ""Text methods for array\/ArrayObject conversions""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\ArrayConversionsPart", "fromLink": "phootwork/lang/parts/ArrayConversionsPart.html", "link": "phootwork/lang/parts/ArrayConversionsPart.html#method_split", "name": "phootwork\\lang\\parts\\ArrayConversionsPart::split", "doc": ""Splits the string by string""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\ArrayConversionsPart", "fromLink": "phootwork/lang/parts/ArrayConversionsPart.html", "link": "phootwork/lang/parts/ArrayConversionsPart.html#method_join", "name": "phootwork\\lang\\parts\\ArrayConversionsPart::join", "doc": ""Join array elements with a string""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\ArrayConversionsPart", "fromLink": "phootwork/lang/parts/ArrayConversionsPart.html", "link": "phootwork/lang/parts/ArrayConversionsPart.html#method_chunk", "name": "phootwork\\lang\\parts\\ArrayConversionsPart::chunk", "doc": ""Convert the string to an array""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/CheckerPart.html", "name": "phootwork\\lang\\parts\\CheckerPart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isEmpty", "name": "phootwork\\lang\\parts\\CheckerPart::isEmpty", "doc": ""Checks if the string is empty""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isAlphanumeric", "name": "phootwork\\lang\\parts\\CheckerPart::isAlphanumeric", "doc": ""Check if the string contains only alphanumeric characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isAlphabetic", "name": "phootwork\\lang\\parts\\CheckerPart::isAlphabetic", "doc": ""Check if the string contains only alphanumeric characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isNumeric", "name": "phootwork\\lang\\parts\\CheckerPart::isNumeric", "doc": ""Check if the string contains only numeric characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isPunctuation", "name": "phootwork\\lang\\parts\\CheckerPart::isPunctuation", "doc": ""Check if the string contains only characters which are not whitespace or an alphanumeric.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isSpace", "name": "phootwork\\lang\\parts\\CheckerPart::isSpace", "doc": ""Check if the string contains only space characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isLowerCase", "name": "phootwork\\lang\\parts\\CheckerPart::isLowerCase", "doc": ""Check if the string contains only lower case characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isUpperCase", "name": "phootwork\\lang\\parts\\CheckerPart::isUpperCase", "doc": ""Check if the string contains only upper case characters.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isSingular", "name": "phootwork\\lang\\parts\\CheckerPart::isSingular", "doc": ""Check if a string is singular form.""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\CheckerPart", "fromLink": "phootwork/lang/parts/CheckerPart.html", "link": "phootwork/lang/parts/CheckerPart.html#method_isPlural", "name": "phootwork\\lang\\parts\\CheckerPart::isPlural", "doc": ""Check if a string is plural form.""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/EachPart.html", "name": "phootwork\\lang\\parts\\EachPart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\EachPart", "fromLink": "phootwork/lang/parts/EachPart.html", "link": "phootwork/lang/parts/EachPart.html#method_each", "name": "phootwork\\lang\\parts\\EachPart::each", "doc": ""Iterates the array and calls the callback function with the current item as parameter""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/InternalPart.html", "name": "phootwork\\lang\\parts\\InternalPart", "doc": ""Internal Text methods""},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\InternalPart", "fromLink": "phootwork/lang/parts/InternalPart.html", "link": "phootwork/lang/parts/InternalPart.html#method_length", "name": "phootwork\\lang\\parts\\InternalPart::length", "doc": """"},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/PopPart.html", "name": "phootwork\\lang\\parts\\PopPart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\PopPart", "fromLink": "phootwork/lang/parts/PopPart.html", "link": "phootwork/lang/parts/PopPart.html#method_pop", "name": "phootwork\\lang\\parts\\PopPart::pop", "doc": ""Pop the element off the end of array""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/ReducePart.html", "name": "phootwork\\lang\\parts\\ReducePart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\ReducePart", "fromLink": "phootwork/lang/parts/ReducePart.html", "link": "phootwork/lang/parts/ReducePart.html#method_reduce", "name": "phootwork\\lang\\parts\\ReducePart::reduce", "doc": ""Iterative reduction of this array or collection with the help of a callback function. The callback\nfunction takes two parameters, the first is the carry, the second the current item, with this\nsignature: mixed callback(mixed $carry, mixed $item)""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/RemovePart.html", "name": "phootwork\\lang\\parts\\RemovePart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\RemovePart", "fromLink": "phootwork/lang/parts/RemovePart.html", "link": "phootwork/lang/parts/RemovePart.html#method_remove", "name": "phootwork\\lang\\parts\\RemovePart::remove", "doc": ""Removes one or more elements from the array""},
{"type": "Trait", "fromName": "phootwork\\lang\\parts", "fromLink": "phootwork/lang/parts.html", "link": "phootwork/lang/parts/ReversePart.html", "name": "phootwork\\lang\\parts\\ReversePart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\lang\\parts\\ReversePart", "fromLink": "phootwork/lang/parts/ReversePart.html", "link": "phootwork/lang/parts/ReversePart.html#method_reverse", "name": "phootwork\\lang\\parts\\ReversePart::reverse", "doc": ""Reverses the order of all elements""},
{"type": "Class", "fromName": "phootwork\\tokenizer", "fromLink": "phootwork/tokenizer.html", "link": "phootwork/tokenizer/PhpTokenizer.html", "name": "phootwork\\tokenizer\\PhpTokenizer", "doc": """"},
{"type": "Method", "fromName": "phootwork\\tokenizer\\PhpTokenizer", "fromLink": "phootwork/tokenizer/PhpTokenizer.html", "link": "phootwork/tokenizer/PhpTokenizer.html#method_tokenize", "name": "phootwork\\tokenizer\\PhpTokenizer::tokenize", "doc": """"},
{"type": "Class", "fromName": "phootwork\\tokenizer", "fromLink": "phootwork/tokenizer.html", "link": "phootwork/tokenizer/TokenCollection.html", "name": "phootwork\\tokenizer\\TokenCollection", "doc": """"},
{"type": "Method", "fromName": "phootwork\\tokenizer\\TokenCollection", "fromLink": "phootwork/tokenizer/TokenCollection.html", "link": "phootwork/tokenizer/TokenCollection.html#method_get", "name": "phootwork\\tokenizer\\TokenCollection::get", "doc": ""Retrieves a token at the given index""},
{"type": "Class", "fromName": "phootwork\\tokenizer", "fromLink": "phootwork/tokenizer.html", "link": "phootwork/tokenizer/TokenVisitorInterface.html", "name": "phootwork\\tokenizer\\TokenVisitorInterface", "doc": """"},
{"type": "Method", "fromName": "phootwork\\tokenizer\\TokenVisitorInterface", "fromLink": "phootwork/tokenizer/TokenVisitorInterface.html", "link": "phootwork/tokenizer/TokenVisitorInterface.html#method_visitToken", "name": "phootwork\\tokenizer\\TokenVisitorInterface::visitToken", "doc": """"},
{"type": "Class", "fromName": "phootwork\\xml", "fromLink": "phootwork/xml.html", "link": "phootwork/xml/XmlParserNoopVisitor.html", "name": "phootwork\\xml\\XmlParserNoopVisitor", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitElementEnd", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitElementEnd", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitProcessingInstruction", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitProcessingInstruction", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitNotationDeclaration", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitNotationDeclaration", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitUnparsedEntityDeclaration", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitUnparsedEntityDeclaration", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitElementStart", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitElementStart", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserNoopVisitor", "fromLink": "phootwork/xml/XmlParserNoopVisitor.html", "link": "phootwork/xml/XmlParserNoopVisitor.html#method_visitCharacterData", "name": "phootwork\\xml\\XmlParserNoopVisitor::visitCharacterData", "doc": """"},
{"type": "Class", "fromName": "phootwork\\xml", "fromLink": "phootwork/xml.html", "link": "phootwork/xml/XmlParserVisitorInterface.html", "name": "phootwork\\xml\\XmlParserVisitorInterface", "doc": """"},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitElementStart", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitElementStart", "doc": ""visits the start of an element""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitElementEnd", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitElementEnd", "doc": ""visits the end of an element""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitCharacterData", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitCharacterData", "doc": ""visits character data""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitProcessingInstruction", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitProcessingInstruction", "doc": ""visits a processing instruction""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitNotationDeclaration", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitNotationDeclaration", "doc": ""visits a notation declaration""},
{"type": "Method", "fromName": "phootwork\\xml\\XmlParserVisitorInterface", "fromLink": "phootwork/xml/XmlParserVisitorInterface.html", "link": "phootwork/xml/XmlParserVisitorInterface.html#method_visitUnparsedEntityDeclaration", "name": "phootwork\\xml\\XmlParserVisitorInterface::visitUnparsedEntityDeclaration", "doc": ""visits an unparsed entity declaration""},
{"type": "Class", "fromName": "phootwork\\xml\\exception", "fromLink": "phootwork/xml/exception.html", "link": "phootwork/xml/exception/XmlException.html", "name": "phootwork\\xml\\exception\\XmlException", "doc": """"},
// Fix trailing commas in the index
{}
];
/** Tokenizes strings by namespaces and functions */
function tokenizer(term) {
if (!term) {
return [];
}
var tokens = [term];
var meth = term.indexOf('::');
// Split tokens into methods if "::" is found.
if (meth > -1) {
tokens.push(term.substr(meth + 2));
term = term.substr(0, meth - 2);
}
// Split by namespace or fake namespace.
if (term.indexOf('\\') > -1) {
tokens = tokens.concat(term.split('\\'));
} else if (term.indexOf('_') > 0) {
tokens = tokens.concat(term.split('_'));
}
// Merge in splitting the string by case and return
tokens = tokens.concat(term.match(/(([A-Z]?[^A-Z]*)|([a-z]?[^a-z]*))/g).slice(0,-1));
return tokens;
};
root.Sami = {
/**
* Cleans the provided term. If no term is provided, then one is
* grabbed from the query string "search" parameter.
*/
cleanSearchTerm: function(term) {
// Grab from the query string
if (typeof term === 'undefined') {
var name = 'search';
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
var results = regex.exec(location.search);
if (results === null) {
return null;
}
term = decodeURIComponent(results[1].replace(/\+/g, " "));
}
return term.replace(/<(?:.|\n)*?>/gm, '');
},
/** Searches through the index for a given term */
search: function(term) {
// Create a new search index if needed
if (!bhIndex) {
bhIndex = new Bloodhound({
limit: 500,
local: searchIndex,
datumTokenizer: function (d) {
return tokenizer(d.name);
},
queryTokenizer: Bloodhound.tokenizers.whitespace
});
bhIndex.initialize();
}
results = [];
bhIndex.get(term, function(matches) {
results = matches;
});
if (!rootPath) {
return results;
}
// Fix the element links based on the current page depth.
return $.map(results, function(ele) {
if (ele.link.indexOf('..') > -1) {
return ele;
}
ele.link = rootPath + ele.link;
if (ele.fromLink) {
ele.fromLink = rootPath + ele.fromLink;
}
return ele;
});
},
/** Get a search class for a specific type */
getSearchClass: function(type) {
return searchTypeClasses[type] || searchTypeClasses['_'];
},
/** Add the left-nav tree to the site */
injectApiTree: function(ele) {
ele.html(treeHtml);
}
};
$(function() {
// Modify the HTML to work correctly based on the current depth
rootPath = $('body').attr('data-root-path');
treeHtml = treeHtml.replace(/href="/g, 'href="' + rootPath);
Sami.injectApiTree($('#api-tree'));
});
return root.Sami;
})(window);
$(function() {
// Enable the version switcher
$('#version-switcher').change(function() {
window.location = $(this).val()
});
// Toggle left-nav divs on click
$('#api-tree .hd span').click(function() {
$(this).parent().parent().toggleClass('opened');
});
// Expand the parent namespaces of the current page.
var expected = $('body').attr('data-name');
if (expected) {
// Open the currently selected node and its parents.
var container = $('#api-tree');
var node = $('#api-tree li[data-name="' + expected + '"]');
// Node might not be found when simulating namespaces
if (node.length > 0) {
node.addClass('active').addClass('opened');
node.parents('li').addClass('opened');
var scrollPos = node.offset().top - container.offset().top + container.scrollTop();
// Position the item nearer to the top of the screen.
scrollPos -= 200;
container.scrollTop(scrollPos);
}
}
var form = $('#search-form .typeahead');
form.typeahead({
hint: true,
highlight: true,
minLength: 1
}, {
name: 'search',
displayKey: 'name',
source: function (q, cb) {
cb(Sami.search(q));
}
});
// The selection is direct-linked when the user selects a suggestion.
form.on('typeahead:selected', function(e, suggestion) {
window.location = suggestion.link;
});
// The form is submitted when the user hits enter.
form.keypress(function (e) {
if (e.which == 13) {
$('#search-form').submit();
return true;
}
});
});