/**
  * True when the current element is valid
  * @return boolean 
  */
 public function isValid()
 {
     if (parent::valid()) {
         $current = $this->current();
         $no = array('all-wcprops', 'svn-base');
         $c1 = strpos($current->getPathname(), $no[0]) === false;
         $c2 = strpos($current->getPathname(), 'svn') === false;
         $c3 = strpos($current->getPathname(), 'php') !== false;
         return $c1 && $c2 && $c3;
     } else {
         return false;
     }
 }
Esempio n. 2
0
 /**
  *
  */
 function valid()
 {
     return parent::valid() && ($this->limit == 0 || $this->count <= $this->limit);
 }
Esempio n. 3
0
	public function current() {
		$this->init();
		if ( parent::valid() ) {
			return $this->cache['current'];
		} else {
			return null; // out of range
		}
	}
Esempio n. 4
0
 public function valid()
 {
     echo "valid(), ";
     return parent::valid();
 }
 /** @return whether the current element is valid
  * which can only happen once per iteration.
  */
 function valid()
 {
     return !$this->done && parent::valid();
 }