示例#1
0
 /**
  * {@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());
 }
示例#2
0
 /**
  * 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;
 }