Build a factory based on the currently configured information

@return Client Factory Factory
508114
public FactoryFactory build() {
        return new FactoryFactory(
                getJceProvider(),
                getHttpClient(),
                getKeyCache(),
                getApiBaseURL(),
                getApiIdentifier(),
                getRequestExpireSeconds(),
                offsetTTL,
                currentPublicKeyTTL,
                entityKeyMap
        );

    }
1022006
public function initFactoriedServices()
    {
        $config = $this->getConfig();
        if (!isset($config['service_manager'])) {
            return $this;
        }
        
        $smConfig = $config['service_manager'];
        if (!isset($smConfig['factories'])) {
            return $this;
        }
        $factories = $smConfig['factories']->toArray();
        $shared    = isset($smConfig['shared']) ? $smConfig['shared']->toArray() : [];
        foreach ($factories as $serviceName => $serviceConfig) {
            $isShare = isset($shared[$serviceName]) ? (bool) $shared[$serviceName] : true;
            $this->setServiceFactories($serviceName, $serviceConfig, $isShare);
        }

        return $this;
    }
830012
public function getConfigsFactory() {
		if ($this->_configsFactory === null) {
			if ($this instanceof LocatorAwareInterface && $this->hasLocator()) {
				$this->_configsFactory = $this->getLocator()->get('configsFactory');
				
				if (! $this->_configsFactory instanceof FactoryInterface) {
					throw new NoConfigsFactory('Configs\' factory must implement the "FactoryInterface"');
				}
			} else {
				throw new NoConfigsFactory('No configs\' factory been supplied, also unable to obtain one through locator');
			}
		}
		
		return $this->_configsFactory;
	}
301856
public ClientFactory build() {
        final Function<? super EventLoopGroup,
                       ? extends AddressResolverGroup<? extends InetSocketAddress>> addressResolverGroupFactory;
        if (this.addressResolverGroupFactory != null) {
            addressResolverGroupFactory = this.addressResolverGroupFactory;
        } else {
            addressResolverGroupFactory = new DefaultAddressResolverGroupFactory(
                    firstNonNull(domainNameResolverCustomizers, ImmutableList.of()));
        }

        return new DefaultClientFactory(new HttpClientFactory(
                workerGroup, shutdownWorkerGroupOnClose, channelOptions, sslContextCustomizer,
                addressResolverGroupFactory, http2InitialConnectionWindowSize, http2InitialStreamWindowSize,
                http2MaxFrameSize, http2MaxHeaderListSize, http1MaxInitialLineLength, http1MaxHeaderSize,
                http1MaxChunkSize, idleTimeoutMillis, useHttp2Preface,
                useHttp1Pipelining, connectionPoolListener, meterRegistry));
    }
505205
public function getAuthFactory(): ?Factory
    {
        if (!$this->hasAuthFactory()) {
            $this->setAuthFactory($this->getDefaultAuthFactory());
        }
        return $this->authFactory;
    }
379341
protected function getFactory(): FactoryInterface
    {
        if ($this->container instanceof FactoryInterface) {
            return $this->container;
        }

        return $this->container->get(FactoryInterface::class);
    }
704289
protected function createClient()
    {
        $client = new MultiCurl();

        $credentials     = $this->getCredentials();
        $isAuthenticated = $credentials instanceof SSLCertificate;

        $client->setVerifyPeer($isAuthenticated);

        if ($isAuthenticated) {
            $client->setOption(CURLOPT_SSLCERT, $credentials->getCertificatePassPhrase());
            $client->setOption(CURLOPT_SSLCERTPASSWD, $credentials->getCertificatePassPhrase());
        }

        $this->serviceClient = new Browser($client);

        return $this;
    }
73929
protected function sourceFactory()
    {
        if (!isset($this->sourceFactory)) {
            throw new RuntimeException(
                sprintf('Source factory is not set for "%s"', get_class($this))
            );
        }
        return $this->sourceFactory;
    }
48460
public function buildFormFactory()
    {
        $this->ensureCsrfTokenManagerAndTranslatorExist();
        $validator = $this->buildValidator();
        $csrf      = new CsrfExtension(
            $this->csrf_token_manager,
            $this->translator,
            TranslatorBuilder::TRANSLATION_DOMAIN
        );
        $builder   = Forms::createFormFactoryBuilder()->addExtension($csrf)
                                            ->addExtension(new ValidatorExtension($validator))
                                            ->addExtension(new HttpFoundationExtension());
        foreach ($this->form_extensions as $extension) {
            $builder->addExtension($extension);
        }
        return $builder->getFormFactory();
    }
59230
public static function factory()
    {
        $self = new static();
        $self->downloader = new Plugins\Csv\Downloader();
        $self->outputter  = new Plugins\Csv\Outputter();
        $self->writer     = new Plugins\Csv\Writer();

        return $self;
    }
1227634
public static function getILoggerFactory () {
    static $nop;
    if (null === self::$factory) {
      if (null == $nop) {
        $nop = new NOPLoggerFactory();
      }
      return $nop;
    }
    return self::$factory;
  }
767339
public static function get_builder_factory() : builder_factory {
        global $PAGE;

        return new builder_factory(
            self::get_legacy_data_mapper_factory(),
            self::get_exporter_factory(),
            self::get_vault_factory(),
            self::get_manager_factory(),
            $PAGE->get_renderer('mod_forum')
        );
    }
1234041
protected function client()
    {
        $apiKey = $this->config('apiKey');
        if (!$apiKey) {
            return null;
        }

        $endpoint = $this->config('endpoint');
        $defaults = $this->config('defaults');
        if ($defaults === null) {
            $defaults = true;
        }
        $client = Client::make($apiKey, $endpoint, $defaults);

        return $client;
    }
919402
public static function factory($config = array())
    {
        $configuration = static::buildConfig($config);

        $client = new self($configuration->get('base_url'), $configuration);

        $client->addSubscriber(new KeyAuthPlugin($configuration->get('key')));

        static::loadDefinitions($client);
        static::toggleRateLimitingPlugin($client, $config);

        return $client;
    }
1059944
protected function getAdapterFactory()
    {
        if (!isset($this->factoryCache[$this->id])) {
            $config = config('jwt');
            if (isset($this->config['adapter'])) {
                $config = array_merge($config, $this->config['adapter']);
            }
            $factoryClass = $this->getAdapterFactoryClass();
            $this->factoryCache[$this->id] = new $factoryClass($config);
        }
        return $this->factoryCache[$this->id];
    }
393206
public final function getFactory()
    {
        $calledClass = get_called_class();
        if (empty(self::$factories[$calledClass])) {
            self::$factories[$calledClass] = $this->getDefaultFactory();
        }

        return self::$factories[$calledClass];
    }
264081
private function getConfigCacheFactory(): ConfigCacheFactoryInterface
    {
        if (null === $this->configCacheFactory) {
            $this->configCacheFactory = new ConfigCacheFactory($this->options['debug']);
        }

        return $this->configCacheFactory;
    }