Public Member Functions | |
PHPTAL_LoopControler (&$context, $data_name, $data) | |
index () | |
key () | |
number () | |
even () | |
odd () | |
start () | |
end () | |
isValid () | |
length () | |
& | next () |
Public Attributes | |
$_context | |
$_data | |
$_data_name | |
$_iterator | |
$_error |
This object is instantiated by the template on each loop.
LoopControlers accept different types of loop target.
Other types are rejected by the loop controler on runtime producing a TypeError exception.
The loop controler install its iterator under the path "repeat/item" where "item" is the name of the output var (defined in the template).
Thus, the template can access differents methods of the iterator: repeat/someitem/key repeat/someitem/index repeat/someitem/next repeat/someitem/last
If not all of these methods are implemented in iterators, ask iterator maintainers.
Definition at line 58 of file LoopControler.php.
|
Controler constructor.
Definition at line 76 of file LoopControler.php. |
|
Return true if at the end of the loop (no more item).
Definition at line 222 of file LoopControler.php. |
|
Return true if index is even.
Definition at line 192 of file LoopControler.php. References odd(). |
|
Return current item index.
Definition at line 158 of file LoopControler.php. Referenced by number(), odd(), PHPTAL_LoopControler(), and start(). |
|
Definition at line 227 of file LoopControler.php. Referenced by PHPTAL_LoopControler(). |
|
Return current item key or index for non associative iterators.
Definition at line 168 of file LoopControler.php. |
|
Return the length of the data (total number of iterations).
Definition at line 237 of file LoopControler.php. Referenced by end(). |
|
Retrieve next iterator value.
Definition at line 247 of file LoopControler.php. Referenced by PHPTAL_LoopControler(). |
|
Index is in range(0, length-1), the number in in range(1, length).
Definition at line 182 of file LoopControler.php. References index(). Referenced by end(). |
|
Return true if index is odd.
Definition at line 202 of file LoopControler.php. References index(). Referenced by even(). |
|
Return true if at the begining of the loop.
Definition at line 212 of file LoopControler.php. References index(). |
|
Definition at line 60 of file LoopControler.php. |
|
Definition at line 61 of file LoopControler.php. |
|
Definition at line 62 of file LoopControler.php. |
|
Definition at line 64 of file LoopControler.php. |
|
Definition at line 63 of file LoopControler.php. |