1 | <?php |
||
11 | trait LastTrait |
||
12 | { |
||
13 | /** |
||
14 | * Returns the last element of this iterable or |
||
15 | * returns $DEFAULT when this iterable is empty |
||
16 | * |
||
17 | * @param mixed $default |
||
18 | * @return mixed |
||
19 | */ |
||
20 | 1 | public function last($default = null) |
|
24 | |||
25 | /** |
||
26 | * Returns the key of the last element of this iterable or |
||
27 | * returns $DEFAULT when this iterable is empty |
||
28 | * |
||
29 | * @param mixed $default |
||
30 | * @return mixed |
||
31 | */ |
||
32 | 5 | public function lastKey($default = null) |
|
39 | } |
||
40 |