This repository was archived by the owner on Mar 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquerypath.patch
More file actions
717 lines (711 loc) · 23.7 KB
/
querypath.patch
File metadata and controls
717 lines (711 loc) · 23.7 KB
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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
diff -urN vendor/querypath-original/querypath/src/QueryPath/DOMQuery.php vendor/querypath/querypath/src/QueryPath/DOMQuery.php
--- vendor/querypath-original/querypath/src/QueryPath/DOMQuery.php Tue Aug 20 04:06:00 2013
+++ vendor/querypath/querypath/src/QueryPath/DOMQuery.php Fri Aug 23 17:22:32 2013
@@ -245,6 +245,7 @@
* A selector. If this is supplied, QueryPath will navigate to the
* document root and then run the query. (Added in QueryPath 2.0 Beta 2)
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, wrapping the root element (document element)
* for the current document.
*/
@@ -260,6 +261,7 @@
* @param string $selector
* CSS 3 Selector
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see filter()
* @see is()
* @todo If a find() returns zero matches, then a subsequent find() will
@@ -306,6 +308,7 @@
* - 'namespace_uri': The URI to be used as the default namespace URI. Used
* with 'namespace_prefix'
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery object wrapping the results of the query.
* @see find()
* @author M Butcher
@@ -389,7 +392,7 @@
* @param boolean $asObject
* If this is TRUE, an SplObjectStorage object will be returned
* instead of an array. This is the preferred method for extensions to use.
- * @return mixed
+ * @return DOMElement|DOMNode|DOMElement[]|DOMNode[]|SplObjectStorage
* If an index is passed, one element will be returned. If no index is
* present, an array of all matches will be returned.
* @see eq()
@@ -424,6 +427,7 @@
* On an XML document, load all XIncludes.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
*/
public function xinclude() {
$this->document->xinclude();
@@ -435,7 +439,7 @@
* Compatibility function for jQuery 1.4, but identical to calling {@link get()}
* with no parameters.
*
- * @return array
+ * @return DOMNode[]|DOMElement[]
* An array of DOMNodes (typically DOMElements).
*/
public function toArray() {
@@ -458,7 +462,7 @@
* The name of the attribute or an associative array of name/value pairs.
* @param string $value
* A value (used only when setting an individual property).
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* If this was a setter request, return the DOMQuery object. If this was
* an access request (getter), return the string value.
* @see removeAttr()
@@ -566,6 +570,7 @@
* @param string $value
* The value to set. This is only set if $name is a string.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
*/
public function css($name = NULL, $value = '') {
if (empty($name)) {
@@ -641,6 +646,7 @@
* A valid context. Use this only if you need to pass a stream context. This is only necessary
* if $data is a URL. (See {@link stream_context_create()}).
* @retval mixed
+ * @return \QueryPath\DOMQuery|mixed
* If this is called as a setter, this will return a DOMQuery object. Otherwise, it
* will attempt to fetch data out of the attribute and return that.
* @see http://en.wikipedia.org/wiki/Data:_URL
@@ -685,6 +691,7 @@
* @param string $name
* Name of the parameter to remove.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the same elements.
* @see attr()
*/
@@ -706,6 +713,7 @@
* The index of the element to keep. The rest will be
* discarded.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see get()
* @see is()
* @see end()
@@ -776,6 +784,7 @@
* @param string $selector
* The selector to use as a filter.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery with non-matching items filtered out.
* @see filterLambda()
* @see filterCallback()
@@ -858,6 +867,7 @@
* If this is TRUE, the sorted results will be inserted back into
* the DOM at the position of the original first element.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* This object.
*/
public function sort($comparator, $modifyDOM = FALSE) {
@@ -916,6 +926,7 @@
* @param string $fn
* Inline lambda function in a string.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see filter()
* @see map()
* @see mapLambda()
@@ -961,6 +972,7 @@
* @param string $regex
* A regular expression.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see filter()
* @see filterCallback()
* @see preg_match()
@@ -996,6 +1008,7 @@
* A callback either as a string (function) or an array (object, method OR
* classname, method).
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* Query path object augmented according to the function.
* @see filter()
* @see filterLambda()
@@ -1022,6 +1035,7 @@
* A selector to use as a negation filter. If the filter is matched, the
* element will be removed from the list.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with matching items filtered out.
* @see find()
*/
@@ -1052,7 +1066,7 @@
* @param DOMElement $subject
* The item to match.
*
- * @return mixed
+ * @return integer|boolean
* The index as an integer (if found), or boolean FALSE. Since 0 is a
* valid index, you should use strong equality (===) to test..
* @see get()
@@ -1090,6 +1104,7 @@
* - $item: The current item.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object wrapping a list of whatever values were returned
* by each run of the callback.
*
@@ -1142,6 +1157,7 @@
* all remaining matches (from $start onward) will be included in the sliced
* list.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see array_slice()
*/
public function slice($start, $length = 0) {
@@ -1181,6 +1197,7 @@
* @param callback $callback
* The callback to run.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery.
* @see eachLambda()
* @see filter()
@@ -1208,6 +1225,7 @@
* @param string $lambda
* The lambda function. This will be passed ($index, &$item).
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object.
* @see each()
* @see filterLambda()
@@ -1240,6 +1258,7 @@
* @param mixed $data
* This can be either a string (the usual case), or a DOM Element.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object.
* @see appendTo()
* @see prepend()
@@ -1288,6 +1307,7 @@
* @param DOMQuery $dest
* A DOMQuery object that will be appended to.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The original DOMQuery, unaltered. Only the destination DOMQuery will
* be modified.
* @see append()
@@ -1307,6 +1327,7 @@
* @param mixed $data
* This can be either a string (the usual case), or a DOM Element.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* @see append()
* @see before()
* @see after()
@@ -1342,6 +1363,7 @@
* @param DOMQuery $dest
* The destination DOMQuery object.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The original DOMQuery, unmodified. NOT the destination DOMQuery.
* @throws QueryPath::Exception
* Thrown if $data is an unsupported object type.
@@ -1361,6 +1383,7 @@
* The data to be inserted. This can be XML in a string, a DomFragment, a DOMElement,
* or the other usual suspects. (See {@link qp()}).
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* Returns the DOMQuery with the new modifications. The list of elements currently
* selected will remain the same.
* @see insertBefore()
@@ -1387,6 +1410,7 @@
* @param DOMQuery $dest
* Destination DOMQuery document.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The current DOMQuery object, unaltered. Only the destination DOMQuery
* object is altered.
* @see before()
@@ -1406,6 +1430,7 @@
* @param DOMQuery $dest
* Destination object where the current elements will be deposited.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The present DOMQuery, unaltered. Only the destination object is altered.
* @see after()
* @see insertBefore()
@@ -1427,6 +1452,7 @@
* @param mixed $data
* The data to be appended.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object (with the items inserted).
* @see before()
* @see append()
@@ -1451,6 +1477,7 @@
* A DOMElement or XML in a string. This will replace all elements
* currently wrapped in the DOMQuery object.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object wrapping <b>the items that were removed</b>.
* This remains consistent with the jQuery API.
* @see append()
@@ -1502,6 +1529,7 @@
* You cannot set more than one child as a root element.)
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, with the same element(s) selected.
* @throws QueryPath::Exception
* An exception is thrown if one attempts to unwrap a root element.
@@ -1548,6 +1576,7 @@
* @param mixed $markup
* Markup that will wrap each element in the current list.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the wrapping changes made.
* @see wrapAll()
* @see wrapInner()
@@ -1596,6 +1625,7 @@
* @param string $markup
* Markup that will wrap all elements in the current list.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the wrapping changes made.
* @see wrap()
* @see wrapInner()
@@ -1635,6 +1665,7 @@
* @param string $markup
* Markup that will wrap children of each element in the current list.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the wrapping changes made.
* @see wrap()
* @see wrapAll()
@@ -1677,6 +1708,7 @@
* nodes at that depth will be included.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery wrapping the single deepest node.
*/
public function deepest() {
@@ -1713,7 +1745,7 @@
* The current set.
* @param DOMNode $deepest
* A reference to the current deepest node.
- * @return array
+ * @return DOMNode[]
* Returns an array of DOM nodes.
*/
protected function deepestNode(\DOMNode $ele, $depth = 0, $current = NULL, &$deepest = NULL) {
@@ -1827,6 +1859,7 @@
* @param string $selector
* A CSS Selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The Query path wrapping a list of removed items.
* @see replaceAll()
* @see replaceWith()
@@ -1872,6 +1905,7 @@
* @param DOMDocument $document
* The destination document.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery wrapping the modified document.
* @deprecated Due to the fact that this is not a particularly friendly method,
* and that it can be easily replicated using {@see replaceWith()}, it is to be
@@ -1902,6 +1936,7 @@
* @param string $selector
* A valid selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the newly added elements.
* @see append()
* @see after()
@@ -1948,6 +1983,7 @@
* The last one returns an empty array because only one level of changes is stored.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object reflecting the list of matches prior to the last destructive
* operation.
* @see andSelf()
@@ -1975,6 +2011,7 @@
*
* @see end();
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object with the results of the last two "destructive" operations.
* @see add()
* @see end()
@@ -1995,6 +2032,7 @@
* PHP built-in, and cannot be used as a method name.)
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the child nodes removed.
* @see replaceWith()
* @see replaceAll()
@@ -2017,6 +2055,7 @@
* @param string $selector
* A valid selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see removeChildren()
* @see parent()
@@ -2064,6 +2103,7 @@
* DOM implementation and configuration.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object wrapping all child nodes for all elements in the
* DOMNode object.
* @see find()
@@ -2099,6 +2139,7 @@
* If the optional selector is provided, siblings will be filtered through
* this expression.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery containing the matched siblings.
* @see contents()
* @see children()
@@ -2133,6 +2174,7 @@
* @param string $selector
* A CSS Selector to match.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The set of matches.
* @since 2.0
*/
@@ -2169,6 +2211,7 @@
* @param string $selector
* A valid CSS3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object wrapping the matching parents.
* @see children()
* @see siblings()
@@ -2205,6 +2248,7 @@
* @param string $selector
* A valid CSS 3 Selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object containing the matching ancestors.
* @see siblings()
* @see children()
@@ -2246,7 +2290,7 @@
*
* @param string $markup
* The text to insert.
- * @return mixed
+ * @return string|DOMQuery
* A string if no markup was passed, or a DOMQuery if markup was passed.
* @see xml()
* @see text()
@@ -2454,7 +2498,7 @@
* @param string $text
* If this is not NULL, this value will be set as the text of the node. It
* will replace any existing content.
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* A DOMQuery if $text is set, or the text content if no text
* is passed in as a pram.
* @see html()
@@ -2495,7 +2539,7 @@
* @param string $text
* If this is set, it will be inserted before each node in the current set of
* selected items.
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* Returns the DOMQuery object if $text was set, and returns a string (possibly empty)
* if no param is passed.
*/
@@ -2546,7 +2590,7 @@
* @deprecated Just use attr(). There's no reason to use this on the server.
* @see attr()
* @param string $value
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* Returns a DOMQuery if a string was passed in, and a string if no string
* was passed in. In the later case, an error will produce NULL.
*/
@@ -2570,7 +2614,7 @@
* It does no processing of the markup (such as schema validation).
* @param string $markup
* A string containing XML data.
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* If markup is passed in, a DOMQuery is returned. If no markup is passed
* in, XML representing the first matched element is returned.
* @see html()
@@ -2648,7 +2692,7 @@
*
* @param string $markup
* A string containing XML data.
- * @return mixed
+ * @return \QueryPath\DOMQuery|string
* If markup is passed in, a DOMQuery is returned. If no markup is passed
* in, XML representing the first matched element is returned.
* @see xhtml()
@@ -2707,6 +2751,7 @@
* @param int $options
* (As of QueryPath 2.1) Pass libxml options to the saving mechanism.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, unmodified.
* @see xml()
* @see innerXML()
@@ -2744,6 +2789,7 @@
* this is NULL, data will be written to STDOUT, which is usually
* sent to the remote browser.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, unmodified.
* @see html()
* @see innerHTML()
@@ -2786,6 +2832,7 @@
* @param string $path
* The filename of the file to write to.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* Returns the DOMQuery, unmodified.
* @throws Exception
* In the event that the output file cannot be written, an exception is
@@ -2803,6 +2850,7 @@
* @param string $selector
* A CSS3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object.
* @see nextAll()
* @see prev()
@@ -2842,6 +2890,7 @@
* @param string $selector
* A valid CSS 3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, now containing the matching siblings.
* @see next()
* @see prevAll()
@@ -2877,6 +2926,7 @@
* @param string $selector
* A valid CSS 3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object, now containing any previous siblings that have been
* found.
* @see prevAll()
@@ -2914,6 +2964,7 @@
* @param string $selector
* A valid CSS 3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, now wrapping previous sibling elements.
* @see prev()
* @see nextAll()
@@ -2951,6 +3002,7 @@
* @param string $class
* The name of the class.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* Returns the DOMQuery object.
* @see css()
* @see attr()
@@ -2996,6 +3048,7 @@
* @param string $class
* The class name to remove.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The modified DOMNode object.
* @see attr()
* @see addClass()
@@ -3107,6 +3160,7 @@
* If a selector is passed in, an additional {@link find()} will be executed
* on the branch before it is returned. (Added in QueryPath 2.0.)
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A copy of the DOMQuery object that points to the same set of elements that
* the original DOMQuery was pointing to.
* @since 1.1
@@ -3151,6 +3205,7 @@
* the list back to the clone's original.
* @see qp()
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
*/
public function cloneAll() {
$found = new \SplObjectStorage();
@@ -3188,6 +3243,7 @@
* @param string $selector
* A CSS Selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The Query path wrapping a list of removed items.
* @see replaceAll()
* @see replaceWith()
@@ -3219,6 +3275,7 @@
* @param DOMQuery $dest
* A DOMQuery Selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The Query path wrapping a list of removed items.
* @see replaceAll()
* @see replaceWith()
@@ -3293,6 +3350,7 @@
* function name.
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object with the newly emptied elements.
* @see removeChildren()
* @since 2.1
@@ -3310,6 +3368,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see removeChildren()
* @see parent()
@@ -3335,6 +3394,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see removeChildren()
* @see parent()
@@ -3359,6 +3419,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see next()
* @see prev()
@@ -3381,6 +3442,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see next()
* @see prev()
@@ -3409,6 +3471,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see next()
* @see prev()
@@ -3434,6 +3497,7 @@
*
*
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMQuery wrapping all of the children.
* @see next()
* @see prev()
@@ -3467,6 +3531,7 @@
* @param string $selector
* A valid CSS 3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, now containing the matching siblings.
* @see next()
* @see prevAll()
@@ -3508,6 +3573,7 @@
* @param string $selector
* A valid CSS 3 selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* The DOMQuery object, now wrapping previous sibling elements.
* @see prev()
* @see nextAll()
@@ -3542,6 +3608,7 @@
* @param string $selector
* A valid CSS 3 Selector.
* @retval object DOMQuery
+ * @return \QueryPath\DOMQuery
* A DOMNode object containing the matching ancestors.
* @see siblings()
* @see children()
@@ -3852,7 +3919,7 @@
/**
* Get an iterator for the matches in this object.
- * @return Iterable
+ * @return \QueryPath\QueryPathIterator
* Returns an iterator.
*/
public function getIterator() {
diff -urN vendor/querypath-original/querypath/src/QueryPath.php vendor/querypath/querypath/src/QueryPath.php
--- vendor/querypath-original/querypath/src/QueryPath.php Tue Aug 20 04:05:58 2013
+++ vendor/querypath/querypath/src/QueryPath.php Fri Aug 23 17:20:12 2013
@@ -162,6 +162,9 @@
</html>';
+ /**
+ * @return \QueryPath\DOMQuery
+ */
public static function with($document = NULL, $selector = NULL, $options = array()) {
$qpClass = isset($options['QueryPath_class']) ? $options['QueryPath_class'] : '\QueryPath\DOMQuery';
@@ -169,6 +172,9 @@
return $qp;
}
+ /**
+ * @return \QueryPath\DOMQuery
+ */
public static function withXML($source = NULL, $selector = NULL, $options = array()) {
$options += array(
'use_parser' => 'xml',
@@ -176,6 +182,9 @@
return self::with($source, $selector, $options);
}
+ /**
+ * @return \QueryPath\DOMQuery
+ */
public static function withHTML($source = NULL, $selector = NULL, $options = array()) {
// Need a way to force an HTML parse instead of an XML parse when the
// doctype is XHTML, since many XHTML documents are not valid XML
@@ -250,6 +259,7 @@
* @endcode
*
* @retval array
+ * @return string[]
* An array of extension names.
*
* @see QueryPath::ExtensionRegistry
@@ -281,7 +291,7 @@
* @param resource $context
* A valid context. Use this only if you need to pass a stream context. This is only necessary
* if $data is a URL. (See {@link stream_context_create()}).
- * @return
+ * @return string
* An encoded data URL.
*/
public static function encodeDataURL($data, $mime = 'application/octet-stream', $context = NULL) {
diff -urN vendor/querypath-original/querypath/src/qp_functions.php vendor/querypath/querypath/src/qp_functions.php
--- vendor/querypath-original/querypath/src/qp_functions.php Tue Aug 20 04:06:00 2013
+++ vendor/querypath/querypath/src/qp_functions.php Fri Aug 23 17:19:46 2013
@@ -146,7 +146,7 @@
* A CSS 3 selector.
* @param array $options
* An associative array of options. Currently supported options are listed above.
- * @return QueryPath
+ * @return \QueryPath\DOMQuery
*/
function qp($document = NULL, $string = NULL, $options = array()) {
return QueryPath::with($document, $string, $options);
@@ -175,6 +175,7 @@
*
* @ingroup querypath_core
* @see qp()
+ * @return \QueryPath\DOMQuery
*/
function htmlqp($document = NULL, $selector = NULL, $options = array()) {
return QueryPath::withHTML($document, $selector, $options);