Zend\View\Helper\Cycle
Helper for alternating between set of values
Synopsis
class Cycle
extends AbstractHelper
implements
Iterator
{
- // constants
- const DEFAULT_NAME = 'default';
- // Inherited members from AbstractHelper
- protected RendererInterface $view;
- // methods
- public Cycle __invoke()
- public string __toString()
- public string toString()
- public Cycle assign()
- public Cycle setName()
- public string getName()
- public array getAll()
- public Cycle next()
- public Cycle prev()
- public int key()
- public Cycle rewind()
- public bool valid()
- public mixed current()
- // Inherited methods from AbstractHelper
- public AbstractHelper setView()
- public null|Renderer getView()
Hierarchy
Constants
Name | Value |
---|---|
DEFAULT_NAME | 'default' |
Members
protected
- $data
—
array
Array of values - $name
—
string
Actual name of cycle - $pointers
—
array
Pointers - $view
—
Zend\View\Renderer\RendererInterface
View object instance
Methods
public
- __invoke() — Add elements to alternate
- __toString() — Cast to string
- assign() — Add elements to alternate
- current() — Return current element
- getAll() — Return all elements
- getName() — Gets actual name of cycle
- key() — Return iteration number
- next() — Move to next value
- prev() — Move to previous value
- rewind() — Rewind pointer
- setName() — Sets actual name of cycle
- toString() — Turn helper into string
- valid() — Check if element is valid