@@ 534-538 (lines=5) @@ | ||
531 | */ |
|
532 | public function appendItem($item, $key = null) |
|
533 | { |
|
534 | if ($key !== null) { |
|
535 | $data = [$key => $item]; |
|
536 | } else { |
|
537 | $data = [$item]; |
|
538 | } |
|
539 | ||
540 | return $this->append($data); |
|
541 | } |
|
@@ 556-560 (lines=5) @@ | ||
553 | */ |
|
554 | public function prependItem($item, $key = null) |
|
555 | { |
|
556 | if ($key !== null) { |
|
557 | $data = [$key => $item]; |
|
558 | } else { |
|
559 | $data = [$item]; |
|
560 | } |
|
561 | ||
562 | return $this->prepend($data); |
|
563 | } |