| // +----------------------------------------------------------------------+ // // $Id$ // /** * Class to handle foreach statements * * */ class HTML_Template_Flexy_Token_Foreach extends HTML_Template_Flexy_Token { /** * variable to loop on. * * @var string * @access public */ var $loopOn = ''; /** * key value * * @var string * @access public */ var $key = ''; /** * optional value (in key=>value pair) * * @var string * @access public */ var $value = ''; /** * Setvalue - a array of all three (last one optional) * @see parent::setValue() */ function setValue($value) { $this->loopOn=$value[0]; if (!isset($value[1]) || !strlen(trim($value[1]))) { // error condition. return false; } $this->key=$value[1]; $this->value=@$value[2]; } }