Finds or creates client serializer directory

@param    array   $purifierConfigSettings   HTML purifier configuration settings
@return   void
193145
protected static function _findOrCreateClientSerializerDirectory($purifierConfigSettings)
	{
		$client = \App::get('client');
		$clientAlias = isset($client->alias) ? $client->alias : $client->name;
		$clientSerializerPath = PATH_APP . "/cache/$clientAlias/htmlpurifier";

		if (!is_dir($clientSerializerPath))
		{
			\App::get('filesystem')->makeDirectory($clientSerializerPath);
		}

		if (is_dir($clientSerializerPath))
		{
			$purifierConfigSettings['Cache.SerializerPath'] = $clientSerializerPath;
		}
	}
72411
public static function configureContainer(LimoncelloContainerInterface $container): void
    {
        $factory = new Factory($container);

        $container[FactoryInterface::class] = $factory;

        $container[JsonSchemasInterface::class] = function (PsrContainerInterface $container) use ($factory) {
            $settings     = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
            $modelSchemas = $container->get(ModelSchemaInfoInterface::class);

            return $factory->createJsonSchemas(
                $settings[FluteSettings::KEY_MODEL_TO_SCHEMA_MAP],
                $settings[FluteSettings::KEY_TYPE_TO_SCHEMA_MAP],
                $modelSchemas
            );
        };

        $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) {
            return new ParametersMapper($container->get(JsonSchemasInterface::class));
        };

        $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) {
            /** @var JsonSchemasInterface $jsonSchemas */
            $jsonSchemas = $container->get(JsonSchemasInterface::class);
            $settings    = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
            $encoder     = $factory
                ->createEncoder($jsonSchemas)
                ->withEncodeOptions($settings[FluteSettings::KEY_JSON_ENCODE_OPTIONS])
                ->withEncodeDepth($settings[FluteSettings::KEY_JSON_ENCODE_DEPTH])
                ->withUrlPrefix($settings[FluteSettings::KEY_URI_PREFIX]);
            isset($settings[FluteSettings::KEY_META]) ? $encoder->withMeta($settings[FluteSettings::KEY_META]) : null;
            ($settings[FluteSettings::KEY_IS_SHOW_VERSION] ?? false) ?
                $encoder->withJsonApiVersion(FluteSettings::DEFAULT_JSON_API_VERSION) : null;

            return $encoder;
        };

        $container[RelationshipPaginationStrategyInterface::class] = function (PsrContainerInterface $container) {
            $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);

            return new BasicRelationshipPaginationStrategy($settings[FluteSettings::KEY_DEFAULT_PAGING_SIZE]);
        };

        $container[JsonApiParserFactoryInterface::class] = function (PsrContainerInterface $container) {
            $factory = new JsonApiParserFactory($container);

            return $factory;
        };

        $container[FormValidatorFactoryInterface::class] = function (PsrContainerInterface $container) {
            $factory = new FormValidatorFactory($container);

            return $factory;
        };

        // register date/date time types
        Type::hasType(DateTimeType::NAME) === true ?: Type::addType(DateTimeType::NAME, DateTimeType::class);
        Type::hasType(DateType::NAME) === true ?: Type::addType(DateType::NAME, DateType::class);
    }
378694
private function setupLaravelConfigFile($providers, $aliases)
    {
        if ($this->installConfigFile() == -1) {
            return -1;
        }

        $this->addProviders($providers);

        $this->addAliases($aliases);
    }
1149111
public function load(array $configs, ContainerBuilder $container)
    {
        parent::load($configs, $container);

        $configuration = $this->createConfigurationParser();
        $this->globalConfiguration = $this->processConfiguration($configuration, $configs);

        $dataGridRegistry = $container->getDefinition(DataGridRegistry::class);
        foreach ((array) $this->globalConfiguration['configurations'] as $code => $dataGridConfiguration) {
            $dataGridConfiguration = $this->finalizeConfiguration($code, $dataGridConfiguration);
            $dataGridRegistry->addMethodCall('addRawDataGridConfiguration', [$code, $dataGridConfiguration]);
        }
    }
951598
public function configureFilesystemAdapter(ContainerBuilder $container, array $config): void
    {
        // add the default configuration for the S3 filesystem
        if ($container->hasDefinition('bkstg.core.adapter.filesystem.do_spaces') && isset($config['filesystem'])) {
            $container->getDefinition('bkstg.core.adapter.filesystem.do_spaces')
                ->replaceArgument(0, new Reference('bkstg.core.adapter.service.do_spaces'))
                ->replaceArgument(1, $config['filesystem']['bucket'])
                ->replaceArgument(
                    2,
                    [
                        'create' => $config['filesystem']['create'],
                        'region' => $config['filesystem']['region'],
                        'directory' => $config['filesystem']['directory'],
                        'ACL' => $config['filesystem']['acl'],
                    ]
                )
            ;

            if (3 === $config['filesystem']['sdk_version']) {
                $arguments = [
                    'region' => $config['filesystem']['region'],
                    'version' => $config['filesystem']['version'],
                ];

                if (isset($config['filesystem']['secretKey'], $config['filesystem']['accessKey'])) {
                    $arguments['credentials'] = [
                        'secret' => $config['filesystem']['secretKey'],
                        'key' => $config['filesystem']['accessKey'],
                    ];
                }

                if (isset($config['filesystem']['endpoint'])) {
                    $arguments['endpoint'] = $config['filesystem']['endpoint'];
                } else {
                    $arguments['endpoint'] = sprintf(
                        'https://%s.digitaloceanspaces.com',
                        $config['filesystem']['region']
                    );
                }

                $container->getDefinition('bkstg.core.adapter.service.do_spaces')
                    ->replaceArgument(0, $arguments)
                ;
            } else {
                $container->getDefinition('bkstg.core.adapter.service.do_spaces')
                    ->replaceArgument(0, [
                        'secret' => $config['filesystem']['secretKey'],
                        'key' => $config['filesystem']['accessKey'],
                    ])
                ;
            }
        } else {
            $container->removeDefinition('bkstg.core.adapter.filesystem.do_spaces');
            $container->removeDefinition('bkstg.core.filesystem.do_spaces');
        }
    }
1019669
protected function storeSettings()
    {
        $dumper = new Dumper();
        $yaml   = $dumper->dump($this->settings, 4);
        file_put_contents(PHPCI_CONFIG_FILE, $yaml);

        if (error_get_last()) {
            $error_get_last = error_get_last();
            return $error_get_last['message'];
        }
    }
3884
public function setSerializers(array $serializers)
    {
        $this->serializers = [];

        foreach ($serializers as $serializer) {
            if (!($serializer instanceof SerializerInterface)) {
                throw new \Exception('SerializerManager manage only ' . __NAMESPACE__ . '\\SerializerInterface');
            }

            $this->serializers[$serializer->getId()] = $serializer;
        }

        return $this;
    }
1222622
protected function serializeConfig($configSerializer)
    {
        if ($configSerializer instanceof ITripodConfigSerializer) {
            return $configSerializer->serialize();
        } elseif (is_array($configSerializer)) {
            return $configSerializer;
        } else {
            throw new \InvalidArgumentException(
                '$configSerializer must an ITripodConfigSerializer or array'
            );
        }
    }
1269616
public function configureProfiler(ContainerBuilder $container, array $config)
    {
        // Setup the data collector service for Symfony profiler
        $dataCollectorDef = new Definition(PheanstalkDataCollector::class);
        $dataCollectorDef->setPublic(false);
        $dataCollectorDef->addTag('data_collector', ['id' => 'pheanstalk', 'template' => $config['profiler']['template']]);
        $dataCollectorDef->addArgument(new Reference('leezy.pheanstalk.pheanstalk_locator'));

        $container->setDefinition('leezy.pheanstalk.data_collector', $dataCollectorDef);
    }
760824
public function create(array $jweSerializers, array $keyEncryptionAlgorithms, array $contentEncryptionAlgorithms, array $compressionMethods, array $jweHeaderCheckers, array $jwsSerializers, array $signatureAlgorithms, array $jwsHeaderCheckers): NestedTokenLoader
    {
        $jweLoader = $this->jweLoaderFactory->create($jweSerializers, $keyEncryptionAlgorithms, $contentEncryptionAlgorithms, $compressionMethods, $jweHeaderCheckers);
        $jwsLoader = $this->jwsLoaderFactory->create($jwsSerializers, $signatureAlgorithms, $jwsHeaderCheckers);

        return new NestedTokenLoader($jweLoader, $jwsLoader);
    }
260909
private function prepareFilterParams($filtersOrConfigurationKey, array $extraFilters = [])
    {
        if (is_array($filtersOrConfigurationKey)) {
            return array_merge($filtersOrConfigurationKey, $extraFilters);
        }

        if (false !== strpos($filtersOrConfigurationKey, '.')) {
            list($configurationKey, $attribute) = explode('.', $filtersOrConfigurationKey);
        } else {
            $configurationKey = $filtersOrConfigurationKey;
            $attribute = null;
        }

        if (!isset($this->filtersConfigurations[$configurationKey])) {
            throw new ConfigurationException(sprintf('Unable to find filter configuration "%s"', $configurationKey));
        }

        if (null !== $attribute) {
            if (!isset($this->filtersConfigurations[$configurationKey][$attribute])) {
                throw new ConfigurationException(sprintf('Unable to find attribute "%s" in filter configuration "%s"', $attribute, $configurationKey));
            }

            return is_array($this->filtersConfigurations[$configurationKey][$attribute])
                ? array_merge($this->filtersConfigurations[$configurationKey][$attribute], $extraFilters)
                : $this->filtersConfigurations[$configurationKey][$attribute]
                ;
        }

        return is_array($this->filtersConfigurations[$configurationKey])
            ? array_merge($this->filtersConfigurations[$configurationKey], $extraFilters)
            : $this->filtersConfigurations[$configurationKey]
            ;
    }
954304
public function load(array $configs, ContainerBuilder $container)
    {
        $config = $this->processConfiguration($this->getConfiguration($configs, $container), $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('gaufrette.xml');

        $adapters = array();

        foreach ($config['adapters'] as $name => $adapter) {
            $adapters[$name] = $this->createAdapter($name, $adapter, $container, $this->factories);
        }

        $map = array();
        foreach ($config['filesystems'] as $name => $filesystem) {
            $map[$name] = $this->createFilesystem($name, $filesystem, $container, $adapters);
        }

        $container->getDefinition('knp_gaufrette.filesystem_map')
            ->setPublic(true)
            ->replaceArgument(0, $map);

        if (isset($config['stream_wrapper'])) {
            $container->setParameter('knp_gaufrette.stream_wrapper.protocol', $config['stream_wrapper']['protocol']);
            $container->setParameter('knp_gaufrette.stream_wrapper.filesystems', $config['stream_wrapper']['filesystems']);
        }
    }
954704
private function configureAutoDiscoveryClients(ContainerBuilder $container, array $config)
    {
        $httpClient = $config['discovery']['client'];
        if ('auto' !== $httpClient) {
            $container->removeDefinition('httplug.auto_discovery.auto_discovered_client');
            $container->removeDefinition('httplug.collector.auto_discovered_client');

            if (!empty($httpClient)) {
                $container->setAlias('httplug.auto_discovery.auto_discovered_client', $httpClient);
                $container->getAlias('httplug.auto_discovery.auto_discovered_client')->setPublic(false);
            }
        }

        $asyncHttpClient = $config['discovery']['async_client'];
        if ('auto' !== $asyncHttpClient) {
            $container->removeDefinition('httplug.auto_discovery.auto_discovered_async');
            $container->removeDefinition('httplug.collector.auto_discovered_async');

            if (!empty($asyncHttpClient)) {
                $container->setAlias('httplug.auto_discovery.auto_discovered_async', $asyncHttpClient);
                $container->getAlias('httplug.auto_discovery.auto_discovered_async')->setPublic(false);
            }
        }

        if (null === $httpClient && null === $asyncHttpClient) {
            $container->removeDefinition('httplug.strategy');

            return;
        }
    }
152681
protected function configureFormatters(array $formatters = array())
    {
        foreach ($formatters as $formatterId => $formatterOptions) {
            $formatterLoader = new FormatterLoader($formatterOptions);
            $this->formatters[$formatterId] = $formatterLoader->load();
        }
    }
858066
public function setSerializer($serializer)
    {
        if (!$serializer instanceof AnDomainSerializerAbstract) {
            if (is_string($serializer) && strpos($serializer, '.') === false) {
                $identifier = clone $this->_repository->getIdentifier();
                $identifier->path = array('domain','serializer');
                $identifier->name = $serializer;
                register_default(array(
                    'identifier' => $identifier, 
                    'prefix' => $this->_repository->getClone()
                ));
            } else {
                $identifier = $this->getIdentifier($serializer);
            }

            $serializer = $identifier;
        }

        $this->_serializer = $serializer;
    }
761438
public static function config_get_serializer_options() {
        $options = array(
            Redis::SERIALIZER_PHP => get_string('serializer_php', 'cachestore_redis')
        );

        if (defined('Redis::SERIALIZER_IGBINARY')) {
            $options[Redis::SERIALIZER_IGBINARY] = get_string('serializer_igbinary', 'cachestore_redis');
        }
        return $options;
    }
166219
public function setHeader($names) {
		if ($names instanceof DataConfig){
			$out = array();
			for ($i=0; $i < sizeof($names->text); $i++)
				$out[]=$names->text[$i]["name"];
			$names = $out;
		}
				
		$this->headerNames = $this->parse_param_array($names);
	}