getIterator
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDOObject::getIterator¶
Returns an xPDO\xPDOIterator over the objects related to this one through the given relation alias. This is the memory-efficient way to walk a large related set, because only one object is loaded at a time.
Syntax¶
xPDO\xPDOIterator|false getIterator (string $alias, [mixed $criteria = null], [boolean|integer $cacheFlag = true])
Example¶
$wheels = $box->getIterator('Wheels');
foreach ($wheels as $wheel) {
echo $wheel->get('position');
}
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










