AnewtGenerator Class Reference

Generator class to generate sequences. More...

List of all members.

Public Member Functions

 __construct ($sequence)
 Constructs a new AnewtGenerator instance.
 next ()
 Returns the next value from the sequence.

Private Attributes

 $sequence
 The sequence this AnewtGenerator iterates over.
 $counter = 0
 The number of times the next() method has been called.


Detailed Description

Generator class to generate sequences.

A generator can be used to generate strings from a sequence. This is useful for e.g. zebra-pattern row listings.

Definition at line 17 of file generator.lib.php.


Constructor & Destructor Documentation

AnewtGenerator::__construct ( sequence  ) 

Constructs a new AnewtGenerator instance.

You should pass the sequence to use, which can be an array array containing values or, alternatively, multiple parameters.

Example of using a single array:

$g = new AnewtGenerator(array('a', 'b', 'c'));

Example of using multiple parameters:

$g = new AnewtGenerator('a', 'b', 'c');

Parameters:
$sequence An array with sequence values or multiple parameters that will be used as a sequence.

Definition at line 40 of file generator.lib.php.


The documentation for this class was generated from the following file:

Generated on Sun Aug 2 22:54:37 2009 for Anewt by  doxygen 1.5.9