/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Collection/Iterator
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Collection/Iterator/TreePrinter.php (3547B)
_value = $this->_propertyExtractor($valuePath);
$this->_key = $this->_propertyExtractor($keyPath);
$this->_spacer = $spacer;
}
/**
* Returns the current iteration key
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
{
$extractor = $this->_key;
return $extractor($this->_fetchCurrent(), parent::key(), $this);
}
/**
* Returns the current iteration value
*
* @return string
*/
public function current(): string
{
$extractor = $this->_value;
$current = $this->_fetchCurrent();
$spacer = str_repeat($this->_spacer, $this->getDepth());
return $spacer . $extractor($current, parent::key(), $this);
}
/**
* Advances the cursor one position
*
* @return void
*/
public function next(): void
{
parent::next();
$this->_current = null;
}
/**
* Returns the current iteration element and caches its value
*
* @return mixed
*/
protected function _fetchCurrent()
{
if ($this->_current !== null) {
return $this->_current;
}
return $this->_current = parent::current();
}
}