src/Factory/AuthenticationAdapterDelegatorFactory.php
/**
     * Attach an adaper to the listener as described by $type and $data.
     *
     * @param string $type
     * @param array $adapterConfig
     * @param ContainerInterface $container
     * @param DefaultAuthenticationListener $listener
     */
Attach an adaper to the listener as described by $type and $data.
Attach an adaper to the listener as described by $type and $data .
private function attachAdapterOfType(
        $type,
        array $adapterConfig,
        ContainerInterface $container,
        DefaultAuthenticationListener $listener
    ) {
        if (! isset($adapterConfig['adapter'])
            || ! is_string($adapterConfig['adapter'])
        ) {
            return;
        }
        switch ($adapterConfig['adapter']) {
            case HttpAdapter::class:
                $adapter = AuthenticationHttpAdapterFactory::factory($type, $adapterConfig, $container);
                break;
            case OAuth2Adapter::class:
                $adapter = AuthenticationOAuth2AdapterFactory::factory($type, $adapterConfig, $container);
                break;
            default:
                $adapter = false;
                break;
        }
        if (! $adapter) {
            return;
        }
        $listener->attach($adapter);
    }
private function attachAdapterOfType ( $ type , array $ adapterConfig , ContainerInterface $ container , DefaultAuthenticationListener $ listener ) { if ( ! isset ( $ adapterConfig [ 'adapter' ] ) || ! is_string ( $ adapterConfig [ 'adapter' ] ) ) { return ; } switch ( $ adapterConfig [ 'adapter' ] ) { case HttpAdapter :: class : $ adapter = AuthenticationHttpAdapterFactory :: factory ( $ type , $ adapterConfig , $ container ) ; break ; case OAuth2Adapter :: class : $ adapter = AuthenticationOAuth2AdapterFactory :: factory ( $ type , $ adapterConfig , $ container ) ; break ; default : $ adapter = false ; break ; } if ( ! $ adapter ) { return ; } $ listener -> attach ( $ adapter ) ; }
Attach an adaper to the listener as described by $type and $data.
Attach an adaper to the listener as described by $type and $data .