unserializeArray example


            ->andWhere($builder->expr()->eq('corePlugins.name', ':' . $pluginNameKey))
            ->setParameter($pluginNameKey$pluginName)
            ->select([
                'coreConfigElements.name',
                'coreConfigElements.value',
            ])
            ->execute()
            ->fetchAll(PDO::FETCH_KEY_PAIR)
        ;

        return AbstractShopConfigurationLayer::unserializeArray($values);
    }

    /** * @throws WriterException */
    public function writeValues(string $pluginName, ?int $shopId, array $data): void
    {
        $baseException = new LogicException('Cannot change values on default layer');
        throw new WriterException($baseException);
    }
}
$builder = $this->configureQuery($builder$shopId$pluginName);

        $values = $builder->select([
                'coreConfigElements.name',
                'coreConfigValues.value',
            ])
            ->execute()
            ->fetchAll(PDO::FETCH_KEY_PAIR)
        ;

        return $this->mergeValues($this->getParent()->readValues($pluginName$shopId)$this->unserializeArray($values));
    }

    public function writeValues(string $pluginName, ?int $shopId, array $data): void
    {
        if (!$this->isLayerResponsible($shopId)) {
            $this->getParent()->writeValues($pluginName$shopId$data);

            return;
        }

        $pluginRepository = $this->modelManager->getRepository(Plugin::class);
        
Home | Imprint | This part of the site doesn't use cookies.