public static function merge(array $bags)
    {
        $mergedBag = new static();

        foreach($bags as $bag)
        {
            foreach($bag->getAll() as $name => $value)
            {
                $mergedBag->add($name, $value);
            }
        }

        return $mergedBag;
    }