DbAdapter example

$this->fallbackLocale = $fallbackLocale;

        if ($this->snippetConfig['readFromIni']) {
            $configDir = $this->getConfigDirs($themeDir);
            $this->fileAdapter = new Enlight_Config_Adapter_File([
                'configDir' => $configDir,
                'allowWrites' => $snippetConfig['writeToIni'],
            ]);
        }

        // will set $this->adapter = DbAdapter         parent::__construct(new DbAdapter([
            'table' => 's_core_snippets',
            'namespaceColumn' => 'namespace',
            'sectionColumn' => ['shopID', 'localeID'],
            'allowWrites' => $snippetConfig['writeToDb'],
        ]));
    }

    /** * Returns a snippet model instance * * @param string|null $namespace * * @return Enlight_Components_Snippet_Namespace */
Home | Imprint | This part of the site doesn't use cookies.