protected function addCacheDirectory(ContainerInterface $container, SerializerBuilder $builder): void
    {
        $config = $container->get('config');
        $libraryConfig = $config[ConfigKey::PROJECT][ConfigKey::API_CLIENT] ?? [];
        $cacheDir = (string) ($libraryConfig[ConfigKey::CACHE_DIR] ?? '');

        if ($cacheDir !== '') {
            $builder->setCacheDir($cacheDir);
        }
    }
protected function addCacheDirectory(ContainerInterface $container, SerializerBuilder $builder): void
    {
        $config = $container->get('config');
        $libraryConfig = $config[ConfigKey::PROJECT][ConfigKey::API_CLIENT] ?? [];
        $cacheDir = (string) ($libraryConfig[ConfigKey::CACHE_DIR] ?? '');

        if ($cacheDir !== '') {
            $builder->setCacheDir($cacheDir);
        }
    }
protected function addCacheDirectory ( ContainerInterface $ container , SerializerBuilder $ builder ) : void { $ config = $ container -> get ( 'config' ) ; $ libraryConfig = $ config [ ConfigKey :: PROJECT ] [ ConfigKey :: API_CLIENT ] ?? [ ] ; $ cacheDir = ( string ) ( $ libraryConfig [ ConfigKey :: CACHE_DIR ] ?? '' ) ; if ( $ cacheDir !== '' ) { $ builder -> setCacheDir ( $ cacheDir ) ; } }
Adds the cache directory from the config to the builder.
@param ContainerInterface $container
@param SerializerBuilder $builder
Adds the cache directory from the config to the builder .