forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SPL.php
2062 lines (1825 loc) · 62.9 KB
/
SPL.php
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
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of SPL v.0.2
/**
* Exception that represents error in the program logic. This kind of
* exceptions should directly lead to a fix in your code.
* @link http://php.net/manual/en/class.logicexception.php
*/
class LogicException extends Exception {
}
/**
* Exception thrown if a callback refers to an undefined function or if some
* arguments are missing.
* @link http://php.net/manual/en/class.badfunctioncallexception.php
*/
class BadFunctionCallException extends LogicException {
}
/**
* Exception thrown if a callback refers to an undefined method or if some
* arguments are missing.
* @link http://php.net/manual/en/class.badmethodcallexception.php
*/
class BadMethodCallException extends BadFunctionCallException {
}
/**
* Exception thrown if a value does not adhere to a defined valid data domain.
* @link http://php.net/manual/en/class.domainexception.php
*/
class DomainException extends LogicException {
}
/**
* Exception thrown if an argument does not match with the expected value.
* @link http://php.net/manual/en/class.invalidargumentexception.php
*/
class InvalidArgumentException extends LogicException {
}
/**
* Exception thrown if a length is invalid.
* @link http://php.net/manual/en/class.lengthexception.php
*/
class LengthException extends LogicException {
}
/**
* Exception thrown when an illegal index was requested. This represents
* errors that should be detected at compile time.
* @link http://php.net/manual/en/class.outofrangeexception.php
*/
class OutOfRangeException extends LogicException {
}
/**
* Exception thrown if an error which can only be found on runtime occurs.
* @link http://php.net/manual/en/class.runtimeexception.php
*/
class RuntimeException extends Exception {
}
/**
* Exception thrown if a value is not a valid key. This represents errors
* that cannot be detected at compile time.
* @link http://php.net/manual/en/class.outofboundsexception.php
*/
class OutOfBoundsException extends RuntimeException {
}
/**
* Exception thrown when you add an element into a full container.
* @link http://php.net/manual/en/class.overflowexception.php
*/
class OverflowException extends RuntimeException {
}
/**
* Exception thrown to indicate range errors during program execution.
* Normally this means there was an arithmetic error other than
* under/overflow. This is the runtime version of
* <b>DomainException</b>.
* @link http://php.net/manual/en/class.rangeexception.php
*/
class RangeException extends RuntimeException {
}
/**
* Exception thrown when you try to remove an element of an empty container.
* @link http://php.net/manual/en/class.underflowexception.php
*/
class UnderflowException extends RuntimeException {
}
/**
* Exception thrown if a value does not match with a set of values. Typically
* this happens when a function calls another function and expects the return
* value to be of a certain type or value not including arithmetic or buffer
* related errors.
* @link http://php.net/manual/en/class.unexpectedvalueexception.php
*/
class UnexpectedValueException extends RuntimeException {
}
/**
* The EmptyIterator class for an empty iterator.
* @link http://www.php.net/manual/en/class.emptyiterator.php
*/
class EmptyIterator implements Iterator, Traversable {
/**
* (PHP 5 >= 5.0.0)<br/>
* Return the current element
* @link http://php.net/manual/en/iterator.current.php
* @return mixed Can return any type.
*/
public function current() { }
/**
* (PHP 5 >= 5.0.0)<br/>
* Move forward to next element
* @link http://php.net/manual/en/iterator.next.php
* @return void Any returned value is ignored.
*/
public function next() { }
/**
* (PHP 5 >= 5.0.0)<br/>
* Return the key of the current element
* @link http://php.net/manual/en/iterator.key.php
* @return mixed scalar on success, or null on failure.
*/
public function key() { }
/**
* (PHP 5 >= 5.0.0)<br/>
* Checks if current position is valid
* @link http://php.net/manual/en/iterator.valid.php
* @return boolean The return value will be casted to boolean and then evaluated.
* Returns true on success or false on failure.
*/
public function valid() { }
/**
* (PHP 5 >= 5.0.0)<br/>
* Rewind the Iterator to the first element
* @link http://php.net/manual/en/iterator.rewind.php
* @return void Any returned value is ignored.
*/
public function rewind() { }
}
/**
* (PHP 5 >= 5.4.0)<br/>
* Filtered iterator using the callback to determine which items are accepted or rejected.
* @link http://www.php.net/manual/en/class.callbackfilteriterator.php
*/
class CallbackFilterIterator extends FilterIterator implements Iterator , Traversable , OuterIterator {
/**
* Creates a filtered iterator using the callback to determine which items are accepted or rejected.
* @param Iterator $iterator The iterator to be filtered.
* @param callable $callback The callback, which should return TRUE to accept the current item or FALSE otherwise.
* May be any valid callable value.
* The callback should accept up to three arguments: the current item, the current key and the iterator, respectively.
* <code> function my_callback($current, $key, $iterator) </code>
* @link http://www.php.net/manual/en/callbackfilteriterator.construct.php
*/
function __construct(Iterator $iterator , callable $callback) { }
/**
* This method calls the callback with the current value, current key and the inner iterator.
* The callback is expected to return TRUE if the current item is to be accepted, or FALSE otherwise.
* @link http://www.php.net/manual/en/callbackfilteriterator.accept.php
* @return bool true if the current element is acceptable, otherwise false.
*/
public function accept() { }
}
/**
* (PHP 5 >= 5.4.0)<br>
* RecursiveCallbackFilterIterator from a RecursiveIterator
* @link http://www.php.net/manual/en/class.recursivecallbackfilteriterator.php
*/
class RecursiveCallbackFilterIterator extends CallbackFilterIterator implements OuterIterator , Traversable , Iterator , RecursiveIterator {
/**
* Create a RecursiveCallbackFilterIterator from a RecursiveIterator
* @param RecursiveIterator $iterator The recursive iterator to be filtered.
* @param string $callback The callback, which should return TRUE to accept the current item or FALSE otherwise. See Examples.
* May be any valid callable value.
* @link http://www.php.net/manual/en/recursivecallbackfilteriterator.getchildren.php
*/
function __construct( RecursiveIterator $iterator, $callback ) { }
/**
* Check whether the inner iterator's current element has children
* @link http://php.net/manual/en/recursiveiterator.haschildren.php
* @return bool Returns TRUE if the current element has children, FALSE otherwise.
*/
public function hasChildren() { }
/**
* Returns an iterator for the current entry.
* @link http://www.php.net/manual/en/recursivecallbackfilteriterator.haschildren.php
* @return RecursiveCallbackFilterIterator containing the children.
*/
public function getChildren() { }
}
/**
* Classes implementing <b>RecursiveIterator</b> can be used to iterate
* over iterators recursively.
* @link http://php.net/manual/en/class.recursiveiterator.php
*/
interface RecursiveIterator extends Iterator, Traversable {
/**
* (PHP 5 >= 5.1.0)<br/>
* Returns if an iterator can be created for the current entry.
* @link http://php.net/manual/en/recursiveiterator.haschildren.php
* @return bool true if the current entry can be iterated over, otherwise returns false.
*/
public function hasChildren();
/**
* (PHP 5 >= 5.1.0)<br/>
* Returns an iterator for the current entry.
* @link http://php.net/manual/en/recursiveiterator.getchildren.php
* @return RecursiveIterator An iterator for the current entry.
*/
public function getChildren();
}
/**
* Can be used to iterate through recursive iterators.
* @link http://php.net/manual/en/class.recursiveiteratoriterator.php
*/
class RecursiveIteratorIterator implements Iterator, Traversable, OuterIterator {
const LEAVES_ONLY = 0;
const SELF_FIRST = 1;
const CHILD_FIRST = 2;
const CATCH_GET_CHILD = 16;
/**
* (PHP 5 >= 5.1.3)<br/>
* Construct a RecursiveIteratorIterator
* @link http://php.net/manual/en/recursiveiteratoriterator.construct.php
* @param Traversable $iterator
* @param $mode [optional]
* @param $flags [optional]
*/
public function __construct(Traversable $iterator, $mode, $flags) { }
/**
* (PHP 5)<br/>
* Rewind the iterator to the first element of the top level inner iterator
* @link http://php.net/manual/en/recursiveiteratoriterator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5)<br/>
* Check whether the current position is valid
* @link http://php.net/manual/en/recursiveiteratoriterator.valid.php
* @return bool true if the current position is valid, otherwise false
*/
public function valid() { }
/**
* (PHP 5)<br/>
* Access the current key
* @link http://php.net/manual/en/recursiveiteratoriterator.key.php
* @return mixed The current key.
*/
public function key() { }
/**
* (PHP 5)<br/>
* Access the current element value
* @link http://php.net/manual/en/recursiveiteratoriterator.current.php
* @return mixed The current elements value.
*/
public function current() { }
/**
* (PHP 5)<br/>
* Move forward to the next element
* @link http://php.net/manual/en/recursiveiteratoriterator.next.php
* @return void
*/
public function next() { }
/**
* (PHP 5)<br/>
* Get the current depth of the recursive iteration
* @link http://php.net/manual/en/recursiveiteratoriterator.getdepth.php
* @return int The current depth of the recursive iteration.
*/
public function getDepth() { }
/**
* (PHP 5)<br/>
* The current active sub iterator
* @link http://php.net/manual/en/recursiveiteratoriterator.getsubiterator.php
* @param $level [optional]
* @return RecursiveIterator The current active sub iterator.
*/
public function getSubIterator($level) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get inner iterator
* @link http://php.net/manual/en/recursiveiteratoriterator.getinneriterator.php
* @return Iterator The current active sub iterator.
*/
public function getInnerIterator() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Begin Iteration
* @link http://php.net/manual/en/recursiveiteratoriterator.beginiteration.php
* @return void
*/
public function beginIteration() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* End Iteration
* @link http://php.net/manual/en/recursiveiteratoriterator.enditeration.php
* @return void
*/
public function endIteration() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Has children
* @link http://php.net/manual/en/recursiveiteratoriterator.callhaschildren.php
* @return bool true if the element has children, otherwise false
*/
public function callHasChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get children
* @link http://php.net/manual/en/recursiveiteratoriterator.callgetchildren.php
* @return RecursiveIterator A <b>RecursiveIterator</b>.
*/
public function callGetChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Begin children
* @link http://php.net/manual/en/recursiveiteratoriterator.beginchildren.php
* @return void
*/
public function beginChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* End children
* @link http://php.net/manual/en/recursiveiteratoriterator.endchildren.php
* @return void
*/
public function endChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Next element
* @link http://php.net/manual/en/recursiveiteratoriterator.nextelement.php
* @return void
*/
public function nextElement() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Set max depth
* @link http://php.net/manual/en/recursiveiteratoriterator.setmaxdepth.php
* @param string $max_depth [optional] <p>
* The maximum allowed depth. -1 is used
* for any depth.
* </p>
* @return void
*/
public function setMaxDepth($max_depth = -1) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get max depth
* @link http://php.net/manual/en/recursiveiteratoriterator.getmaxdepth.php
* @return mixed The maximum accepted depth, or false if any depth is allowed.
*/
public function getMaxDepth() { }
}
/**
* Classes implementing <b>OuterIterator</b> can be used to iterate
* over iterators.
* @link http://php.net/manual/en/class.outeriterator.php
*/
interface OuterIterator extends Iterator, Traversable {
/**
* (PHP 5 >= 5.1.0)<br/>
* Returns the inner iterator for the current entry.
* @link http://php.net/manual/en/outeriterator.getinneriterator.php
* @return Iterator The inner iterator for the current entry.
*/
public function getInnerIterator();
}
/**
* This iterator wrapper allows the conversion of anything that is
* Traversable into an Iterator.
* It is important to understand that most classes that do not implement
* Iterators have reasons as most likely they do not allow the full
* Iterator feature set. If so, techniques should be provided to prevent
* misuse, otherwise expect exceptions or fatal errors.
* @link http://php.net/manual/en/class.iteratoriterator.php
*/
class IteratorIterator implements Iterator, Traversable, OuterIterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Create an iterator from anything that is traversable
* @link http://php.net/manual/en/iteratoriterator.construct.php
* @param Traversable $iterator
*/
public function __construct(Traversable $iterator) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the inner iterator
* @link http://php.net/manual/en/iteratoriterator.getinneriterator.php
* @return Iterator The inner iterator as passed to IteratorIterator::__construct.
*/
public function getInnerIterator() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Rewind to the first element
* @link http://php.net/manual/en/iteratoriterator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Checks if the iterator is valid
* @link http://php.net/manual/en/iteratoriterator.valid.php
* @return bool true if the iterator is valid, otherwise false
*/
public function valid() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the key of the current element
* @link http://php.net/manual/en/iteratoriterator.key.php
* @return mixed The key of the current element.
*/
public function key() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the current value
* @link http://php.net/manual/en/iteratoriterator.current.php
* @return mixed The value of the current element.
*/
public function current() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Forward to the next element
* @link http://php.net/manual/en/iteratoriterator.next.php
* @return void
*/
public function next() { }
}
/**
* This abstract iterator filters out unwanted values. This class should be extended to
* implement custom iterator filters. The <b>FilterIterator::accept</b>
* must be implemented in the subclass.
* @link http://php.net/manual/en/class.filteriterator.php
*/
abstract class FilterIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the current element of the iterator is acceptable
* @link http://php.net/manual/en/filteriterator.accept.php
* @return bool true if the current element is acceptable, otherwise false.
*/
abstract public function accept();
/**
* (PHP 5 >= 5.1.0)<br/>
* Construct a filterIterator
* @link http://php.net/manual/en/filteriterator.construct.php
* @param Iterator $iterator
*/
public function __construct(Iterator $iterator) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Rewind the iterator
* @link http://php.net/manual/en/filteriterator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the current element is valid
* @link http://php.net/manual/en/filteriterator.valid.php
* @return bool true if the current element is valid, otherwise false
*/
public function valid() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the current key
* @link http://php.net/manual/en/filteriterator.key.php
* @return mixed The current key.
*/
public function key() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the current element value
* @link http://php.net/manual/en/filteriterator.current.php
* @return mixed The current element value.
*/
public function current() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Move the iterator forward
* @link http://php.net/manual/en/filteriterator.next.php
* @return void
*/
public function next() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the inner iterator
* @link http://php.net/manual/en/filteriterator.getinneriterator.php
* @return Iterator The inner iterator.
*/
public function getInnerIterator() { }
}
/**
* This abstract iterator filters out unwanted values for a <b>RecursiveIterator</b>.
* This class should be extended to implement custom filters.
* The <b>RecursiveFilterIterator::accept</b> must be implemented in the subclass.
* @link http://php.net/manual/en/class.recursivefilteriterator.php
*/
abstract class RecursiveFilterIterator extends FilterIterator implements Iterator, Traversable, OuterIterator, RecursiveIterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Create a RecursiveFilterIterator from a RecursiveIterator
* @link http://php.net/manual/en/recursivefilteriterator.construct.php
* @param RecursiveIterator $iterator
*/
public function __construct(RecursiveIterator $iterator) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the inner iterator's current element has children
* @link http://php.net/manual/en/recursivefilteriterator.haschildren.php
* @return bool true if the inner iterator has children, otherwise false
*/
public function hasChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Return the inner iterator's children contained in a RecursiveFilterIterator
* @link http://php.net/manual/en/recursivefilteriterator.getchildren.php
* @return RecursiveFilterIterator containing the inner iterator's children.
*/
public function getChildren() { }
}
/**
* This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children.
* @link http://php.net/manual/en/class.parentiterator.php
*/
class ParentIterator extends RecursiveFilterIterator implements RecursiveIterator, OuterIterator, Traversable, Iterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Determines acceptability
* @link http://php.net/manual/en/parentiterator.accept.php
* @return bool true if the current element is acceptable, otherwise false.
*/
public function accept() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Constructs a ParentIterator
* @link http://php.net/manual/en/parentiterator.construct.php
* @param RecursiveIterator $iterator
*/
public function __construct(RecursiveIterator $iterator) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the inner iterator's current element has children
* @link http://php.net/manual/en/recursivefilteriterator.haschildren.php
* @return bool true if the inner iterator has children, otherwise false
*/
public function hasChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Return the inner iterator's children contained in a RecursiveFilterIterator
* @link http://php.net/manual/en/recursivefilteriterator.getchildren.php
* @return ParentIterator containing the inner iterator's children.
*/
public function getChildren() { }
}
/**
* Classes implementing <b>Countable</b> can be used with the
* <b>count</b> function.
* @link http://php.net/manual/en/class.countable.php
*/
interface Countable {
/**
* (PHP 5 >= 5.1.0)<br/>
* Count elements of an object
* @link http://php.net/manual/en/countable.count.php
* @return int The custom count as an integer.
* </p>
* <p>
* The return value is cast to an integer.
*/
public function count();
}
/**
* The Seekable iterator.
* @link http://php.net/manual/en/class.seekableiterator.php
*/
interface SeekableIterator extends Iterator, Traversable {
/**
* (PHP 5 >= 5.1.0)<br/>
* Seeks to a position
* @link http://php.net/manual/en/seekableiterator.seek.php
* @param int $position <p>
* The position to seek to.
* </p>
* @return void
*/
public function seek($position);
}
/**
* The <b>LimitIterator</b> class allows iteration over
* a limited subset of items in an <b>Iterator</b>.
* @link http://php.net/manual/en/class.limititerator.php
*/
class LimitIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Construct a LimitIterator
* @link http://php.net/manual/en/limititerator.construct.php
* @param Iterator $iterator
* @param $offset [optional]
* @param $count [optional]
*/
public function __construct(Iterator $iterator, $offset, $count) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Rewind the iterator to the specified starting offset
* @link http://php.net/manual/en/limititerator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the current element is valid
* @link http://php.net/manual/en/limititerator.valid.php
* @return bool true on success or false on failure.
*/
public function valid() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get current key
* @link http://php.net/manual/en/limititerator.key.php
* @return mixed the key for the current item.
*/
public function key() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get current element
* @link http://php.net/manual/en/limititerator.current.php
* @return mixed the current element or null if there is none.
*/
public function current() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Move the iterator forward
* @link http://php.net/manual/en/limititerator.next.php
* @return void
*/
public function next() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Seek to the given position
* @link http://php.net/manual/en/limititerator.seek.php
* @param int $position <p>
* The position to seek to.
* </p>
* @return int the offset position after seeking.
*/
public function seek($position) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Return the current position
* @link http://php.net/manual/en/limititerator.getposition.php
* @return int The current position.
*/
public function getPosition() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get inner iterator
* @link http://php.net/manual/en/limititerator.getinneriterator.php
* @return Iterator The inner iterator passed to <b>LimitIterator::__construct</b>.
*/
public function getInnerIterator() { }
}
/**
* This object supports cached iteration over another iterator.
* @link http://php.net/manual/en/class.cachingiterator.php
*/
class CachingIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator, ArrayAccess, Countable {
const CALL_TOSTRING = 1;
const CATCH_GET_CHILD = 16;
const TOSTRING_USE_KEY = 2;
const TOSTRING_USE_CURRENT = 4;
const TOSTRING_USE_INNER = 8;
const FULL_CACHE = 256;
/**
* (PHP 5)<br/>
* Construct a new CachingIterator object for the iterator.
* @link http://php.net/manual/en/cachingiterator.construct.php
* @param Iterator $iterator
* @param $flags [optional]
*/
public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) { }
/**
* (PHP 5)<br/>
* Rewind the iterator
* @link http://php.net/manual/en/cachingiterator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5)<br/>
* Check whether the current element is valid
* @link http://php.net/manual/en/cachingiterator.valid.php
* @return bool true on success or false on failure.
*/
public function valid() { }
/**
* (PHP 5)<br/>
* Return the key for the current element
* @link http://php.net/manual/en/cachingiterator.key.php
* @return mixed
*/
public function key() { }
/**
* (PHP 5)<br/>
* Return the current element
* @link http://php.net/manual/en/cachingiterator.current.php
* @return mixed
*/
public function current() { }
/**
* (PHP 5)<br/>
* Move the iterator forward
* @link http://php.net/manual/en/cachingiterator.next.php
* @return void
*/
public function next() { }
/**
* (PHP 5)<br/>
* Check whether the inner iterator has a valid next element
* @link http://php.net/manual/en/cachingiterator.hasnext.php
* @return bool true on success or false on failure.
*/
public function hasNext() { }
/**
* (PHP 5)<br/>
* Return the string representation of the current element
* @link http://php.net/manual/en/cachingiterator.tostring.php
* @return string The string representation of the current element.
*/
public function __toString() { }
/**
* (PHP 5)<br/>
* Returns the inner iterator
* @link http://php.net/manual/en/cachingiterator.getinneriterator.php
* @return Iterator an object implementing the Iterator interface.
*/
public function getInnerIterator() { }
/**
* (PHP 5 >= 5.2.0)<br/>
* Get flags used
* @link http://php.net/manual/en/cachingiterator.getflags.php
* @return int Bitmask of the flags
*/
public function getFlags() { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The setFlags purpose
* @link http://php.net/manual/en/cachingiterator.setflags.php
* @param int $flags Bitmask of the flags to set.
* @return void
*/
public function setFlags($flags) { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The offsetGet purpose
* @link http://php.net/manual/en/cachingiterator.offsetget.php
* @param string $index <p>
* Description...
* </p>
* @return void Description...
*/
public function offsetGet($index) { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The offsetSet purpose
* @link http://php.net/manual/en/cachingiterator.offsetset.php
* @param string $index <p>
* The index of the element to be set.
* </p>
* @param string $newval <p>
* The new value for the <i>index</i>.
* </p>
* @return void
*/
public function offsetSet($index, $newval) { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The offsetUnset purpose
* @link http://php.net/manual/en/cachingiterator.offsetunset.php
* @param string $index <p>
* The index of the element to be unset.
* </p>
* @return void
*/
public function offsetUnset($index) { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The offsetExists purpose
* @link http://php.net/manual/en/cachingiterator.offsetexists.php
* @param string $index <p>
* The index being checked.
* </p>
* @return bool true if an entry referenced by the offset exists, false otherwise.
*/
public function offsetExists($index) { }
/**
* (PHP 5 >= 5.2.0)<br/>
* The getCache purpose
* @link http://php.net/manual/en/cachingiterator.getcache.php
* @return array Description...
*/
public function getCache() { }
/**
* (PHP 5 >= 5.2.2)<br/>
* The number of elements in the iterator
* @link http://php.net/manual/en/cachingiterator.count.php
* @return void The count of the elements iterated over.
*/
public function count() { }
}
/**
* ...
* @link http://php.net/manual/en/class.recursivecachingiterator.php
*/
class RecursiveCachingIterator extends CachingIterator
implements Countable, ArrayAccess, Iterator, Traversable, OuterIterator, RecursiveIterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Construct
* @link http://php.net/manual/en/recursivecachingiterator.construct.php
* @param Iterator $iterator The iterator being used.
* @param int $flags [optional] The flags. Use CALL_TOSTRING to call RecursiveCachingIterator::__toString() for every element (the default),
* and/or CATCH_GET_CHILD to catch exceptions when trying to get children.
*/
public function __construct(Iterator $iterator, $flags = self::CALL_TOSTRING) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Check whether the current element of the inner iterator has children
* @link http://php.net/manual/en/recursivecachingiterator.haschildren.php
* @return bool true if the inner iterator has children, otherwise false
*/
public function hasChildren() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Return the inner iterator's children as a RecursiveCachingIterator
* @link http://php.net/manual/en/recursivecachingiterator.getchildren.php
* @return RecursiveCachingIterator The inner iterator's children, as a RecursiveCachingIterator.
*/
public function getChildren() { }
}
/**
* This iterator cannot be rewinded.
* @link http://php.net/manual/en/class.norewinditerator.php
*/
class NoRewindIterator extends IteratorIterator implements OuterIterator, Traversable, Iterator {
/**
* (PHP 5 >= 5.1.0)<br/>
* Construct a NoRewindIterator
* @link http://php.net/manual/en/norewinditerator.construct.php
* @param Iterator $iterator
*/
public function __construct(Iterator $iterator) { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Prevents the rewind operation on the inner iterator.
* @link http://php.net/manual/en/norewinditerator.rewind.php
* @return void
*/
public function rewind() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Validates the iterator
* @link http://php.net/manual/en/norewinditerator.valid.php
* @return bool true on success or false on failure.
*/
public function valid() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the current key
* @link http://php.net/manual/en/norewinditerator.key.php
* @return mixed The current key.
*/
public function key() { }
/**
* (PHP 5 >= 5.1.0)<br/>
* Get the current value
* @link http://php.net/manual/en/norewinditerator.current.php
* @return mixed The current value.
*/
public function current() { }
/**