public function fill($items, callable $callback)
    {
        $menu = $this;

        foreach ($items as $key => $item) {
            $menu = $callback($menu, $item, $key) ?: $menu;
        }

        return $menu;
    }
public function fill($items, callable $callback)
    {
        $menu = $this;

        foreach ($items as $key => $item) {
            $menu = $callback($menu, $item, $key) ?: $menu;
        }

        return $menu;
    }
public function fill ( $ items , callable $ callback ) { $ menu = $ this ; foreach ( $ items as $ key => $ item ) { $ menu = $ callback ( $ menu , $ item , $ key ) ? : $ menu ; } return $ menu ; }
Fill a menu from an array. The callback receives a menu instance as
the accumulator, the array item as the second parameter, and the item's
key as the third.

@param array|\Iterator $items
@param callable $callback

@return static
Fill a menu from an array . The callback receives a menu instance as the accumulator the array item as the second parameter and the item s key as the third .