getIdentifier(); if (isset($this->idiotBox[$id])) { $id .= '_' . $this->idiotBox[$id]++; } else { $this->idiotBox[$id] = 0; } $this->set($binding->getSource()->getPath()->__toString(), $binding); $binding->onIndexed($id, $this); } /** * Builds all the links in this index and returns them as an array of arrays, * keyed by link ID. * * @return array */ public function build() { $build = []; foreach ($this as $binding) { $build[ $binding->getIdentifier() ] = $binding->build(); } return $build; } }