Changeset 1431
- Timestamp:
- 06/13/06 13:56:51 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/view/escaper/sfOutputEscaperArrayDecorator.class.php
r1415 r1431 30 30 { 31 31 /** 32 * Used by the iterator to rememberif the current element is valid.32 * Used by the iterator to know if the current element is valid. 33 33 * 34 * @var boolean34 * @var int 35 35 */ 36 private $ valid = false;36 private $count; 37 37 38 38 /** … … 41 41 public function rewind() 42 42 { 43 $this->valid = (reset($this->value) !== false); 43 reset($this->value); 44 45 $this->count = count($this->value); 44 46 } 45 47 … … 74 76 public function next() 75 77 { 76 $this->valid = (next($this->value) !== false); 78 next($this->value); 79 80 $this->count --; 77 81 } 78 82 … … 89 93 public function valid() 90 94 { 91 return $this-> valid;95 return $this->count > 0; 92 96 } 93 97