WireArray::getIterator() method

Allows iteration of the WireArray.

  • Fulfills PHP's IteratorAggregate interface so that you can traverse the WireArray.
  • No need to call this method directly, just use PHP's foreach() method on the WireArray.

Example

// Traversing a WireArray with foreach:
foreach($items as $item) {
  // ...
}

Usage

$arrayObject = $wireArray->getIterator();

Return value

ArrayObject Wire

[]


WireArray methods and properties

API reference based on ProcessWire core version 3.0.244

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer