public static function extensions($extensions = null, $merge = true)
    {
        $collection = static::$_collection;
        if ($extensions === null) {
            if (!static::$initialized) {
                static::_loadRoutes();
            }

            return array_unique(array_merge(static::$_defaultExtensions, $collection->getExtensions()));
        }
        $extensions = (array)$extensions;
        if ($merge) {
            $extensions = array_unique(array_merge(static::$_defaultExtensions, $extensions));
        }

        return static::$_defaultExtensions = $extensions;
    }