View/Helper/Cycle.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_View  
Subpackage
Helper  
Version
$Id$  

\Zend_View_Helper_Cycle

Package: Zend_View\Helper
Helper for alternating between set of values
Implements
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstantstring  DEFAULT_NAME = 'default'
Default name
DEFAULT_NAME
string

Properties

>VPropertyprotectedarray $_data = array(self::DEFAULT_NAME => array())
Array of values
Default valuearray(self::DEFAULT_NAME => array())Details
Type
array
>VPropertyprotectedstring $_name = self::DEFAULT_NAME
Actual name of cycle
Default valueself::DEFAULT_NAMEDetails
Type
string
>VPropertyprotectedarray $_pointers = array(self::DEFAULT_NAME => -1)
Pointers
Default valuearray(self::DEFAULT_NAME => -1)Details
Type
array

Methods

methodpublic__toString() : string

Cast to string

Returns
TypeDescription
string
methodpublicassign(array $data, string $name = self::DEFAULT_NAME) : \Zend_View_Helper_Cycle

Add elements to alternate

Parameters
NameTypeDescription
$dataarray
$namestring
Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpubliccurrent() : mixed

Return current element

Returns
TypeDescription
mixed
methodpubliccycle(array $data = array(), string $name = self::DEFAULT_NAME) : \Zend_View_Helper_Cycle

Add elements to alternate

Parameters
NameTypeDescription
$dataarray
$namestring
Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpublicgetAll() : array

Return all elements

Returns
TypeDescription
array
methodpublicgetName() : string

Gets actual name of cycle

Returns
TypeDescription
string
methodpublickey() : int

Return iteration number

Returns
TypeDescription
int
methodpublicnext() : \Zend_View_Helper_Cycle

Move to next value

Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpublicprev() : \Zend_View_Helper_Cycle

Move to previous value

Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpublicrewind() : \Zend_View_Helper_Cycle

Rewind pointer

Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpublicsetName(string $name = self::DEFAULT_NAME) : \Zend_View_Helper_Cycle

Sets actual name of cycle

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_View_Helper_Cycle
methodpublictoString() : string

Turn helper into string

Returns
TypeDescription
string
methodpublicvalid() : bool

Check if element is valid

Returns
TypeDescription
bool
Documentation was generated by phpDocumentor 2.2.0 .