$data = false;
for ($i = 0,
$l = \
count($elements);
$i <
$l; ++
$i) { if (!
$data) { // The element "data" has not yet been passed
if ('children' ===
$elements[$i] &&
$path->
isProperty($i)) { // Skip element "children"
++
$i;
// Next element must exist and must be an index
// Otherwise consider this the end of the path
if ($i >=
$l || !
$path->
isIndex($i)) { break;
} // All the following index items (regardless if .children is
// explicitly used) are children and grand-children
for (;
$i <
$l &&
$path->
isIndex($i); ++
$i) { $this->elements
[] =
$elements[$i];
$this->isIndex
[] = true;
$this->mapsForm
[] = true;
}