protected function mergeWithOrder($settings, &$merge)
    {
        if (isset($merge[$settings->order])) {
            $this->mergeWithOrder(++$settings->order, $merge);
        }

        return $merge[$settings->order] = $settings;
    }
protected function mergeWithOrder($settings, &$merge)
    {
        if (isset($merge[$settings->order])) {
            $this->mergeWithOrder(++$settings->order, $merge);
        }

        return $merge[$settings->order] = $settings;
    }
protected function mergeWithOrder ( $ settings , & $ merge ) { if ( isset ( $ merge [ $ settings -> order ] ) ) { $ this -> mergeWithOrder ( ++ $ settings -> order , $ merge ) ; } return $ merge [ $ settings -> order ] = $ settings ; }
Merge resources to one array preserving order

@param $settings
@param $merge
@return mixed
Merge resources to one array preserving order