Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory::determineEntryPoint PHP Method

determineEntryPoint() private method

private determineEntryPoint ( $defaultEntryPointId, array $config )
$config array
    private function determineEntryPoint($defaultEntryPointId, array $config)
    {
        if ($defaultEntryPointId) {
            // explode if they've configured the entry_point, but there is already one
            if ($config['entry_point']) {
                throw new \LogicException(sprintf('The guard authentication provider cannot use the "%s" entry_point because another entry point is already configured by another provider! Either remove the other provider or move the entry_point configuration as a root key under your firewall (i.e. at the same level as "guard").', $config['entry_point']));
            }
            return $defaultEntryPointId;
        }
        if ($config['entry_point']) {
            // if it's configured explicitly, use it!
            return $config['entry_point'];
        }
        $authenticatorIds = $config['authenticators'];
        if (count($authenticatorIds) == 1) {
            // if there is only one authenticator, use that as the entry point
            return array_shift($authenticatorIds);
        }
        // we have multiple entry points - we must ask them to configure one
        throw new \LogicException(sprintf('Because you have multiple guard configurators, you need to set the "guard.entry_point" key to one of you configurators (%s)', implode(', ', $authenticatorIds)));
    }