/** * {@inheritDoc} */ public function visitArray(AST\Bag\RulerArray $element, &$handle = null, $eldnah = null) { return array_map(function ($item) use(&$handle, $eldnah) { return $item->accept($this, $handle, $eldnah); }, $element->getArray()); }
/** * Visit an array * * @param \Hoa\Visitor\Element $element Element to visit. * @param mixed &$handle Handle (reference). * @param mixed $eldnah Handle (not reference). * @return array */ protected function visitArray(Ruler\Model\Bag\RulerArray $element, &$handle = null, $eldnah = null) { $out = []; foreach ($element->getArray() as $key => $data) { $out[$key] = $data->accept($this, $handle, $eldnah); } return $out; }