1 | <?php |
||
22 | final class GlobalConstantIterator implements Iterator |
||
23 | { |
||
24 | /** |
||
25 | * @var Const_ |
||
26 | */ |
||
27 | private $constant; |
||
28 | |||
29 | /** |
||
30 | * @var int index of the current constant to use |
||
31 | */ |
||
32 | private $index = 0; |
||
33 | |||
34 | /** |
||
35 | * Initializes the class with source data. |
||
36 | */ |
||
37 | 5 | public function __construct(Const_ $constant) |
|
41 | |||
42 | /** |
||
43 | * Gets line the node started in. |
||
44 | * |
||
45 | * @return int Line |
||
46 | */ |
||
47 | 1 | public function getLine() : int |
|
51 | |||
52 | /** |
||
53 | * Returns the name of the current constant. |
||
54 | */ |
||
55 | 1 | public function getName() : string |
|
59 | |||
60 | /** |
||
61 | * Returns the fqsen of the current constant. |
||
62 | */ |
||
63 | 1 | public function getFqsen() : Fqsen |
|
67 | |||
68 | /** |
||
69 | * Gets the doc comment of the node. |
||
70 | * |
||
71 | * The doc comment has to be the last comment associated with the node. |
||
72 | */ |
||
73 | 2 | public function getDocComment() : ?Doc |
|
82 | |||
83 | public function getValue() |
||
87 | |||
88 | /** |
||
89 | * @link http://php.net/manual/en/iterator.current.php |
||
90 | */ |
||
91 | 1 | public function current() : self |
|
95 | |||
96 | /** |
||
97 | * @link http://php.net/manual/en/iterator.next.php |
||
98 | */ |
||
99 | 2 | public function next() : void |
|
103 | |||
104 | /** |
||
105 | * @link http://php.net/manual/en/iterator.key.php |
||
106 | */ |
||
107 | 1 | public function key() : ?int |
|
111 | |||
112 | /** |
||
113 | * @link http://php.net/manual/en/iterator.valid.php |
||
114 | */ |
||
115 | 1 | public function valid() : bool |
|
119 | |||
120 | /** |
||
121 | * @link http://php.net/manual/en/iterator.rewind.php |
||
122 | */ |
||
123 | 1 | public function rewind() : void |
|
127 | } |
||
128 |