defaultNamespaceClass example

/** * Returns a snippet model instance * * @param string|null $namespace * * @return Enlight_Components_Snippet_Namespace */
    public function getNamespace($namespace = null)
    {
        $key = $namespace === null ? '__ignore' : (string) $namespace;
        if (!isset($this->namespaces[$key])) {
            $this->namespaces[$key] = new $this->defaultNamespaceClass([
                'adapter' => $this->adapter,
                'name' => $namespace,
                'section' => $this->defaultSection,
            ]);
        }

        return $this->namespaces[$key];
    }

    /** * Adapter class of the snippet manager * * @return Enlight_Config_Adapter */
$namespace,
                $this->shop ? $this->shop->getId() : 1,
                $this->locale ? $this->locale->getId() : $this->getDefaultLocale()->getId()
            );
        }

        if ($this->readFromIni($key)) {
            $this->namespaces[$key] = $this->createIniNamespace($namespace);
        }

        if (!isset($this->namespaces[$key])) {
            $this->namespaces[$key] = new $this->defaultNamespaceClass(['name' => $namespace]);
        }

        $instance = $this->namespaces[$key];
        if ($this->requiresFallback($instance)) {
            $instance->setFallback($this->createDbNamespace($namespace, 1, $this->fallbackLocale->getId()));
        }

        return $this->namespaces[$key];
    }

    /** * Set locale instance * * @return Shopware_Components_Snippet_Manager */
Home | Imprint | This part of the site doesn't use cookies.