Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextFactory::create PHP Méthode

create() public méthode

{@inheritDoc}
public create ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$request Symfony\Component\HttpFoundation\Request
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
    public function create(Request $request, TokenInterface $token)
    {
        return new $this->authenticationContextClass($request, $token);
    }

Usage Example

 /**
  * @test
  */
 public function create_onCreate_returnAuthenticationContext()
 {
     $this->assertInstanceOf('Scheb\\TwoFactorBundle\\Security\\TwoFactor\\AuthenticationContext', $this->authenticationContextFactory->create($this->request, $this->token));
 }
AuthenticationContextFactory