当前位置: 首页>>代码示例>>PHP>>正文


PHP AuthenticationException::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\Security\Core\Exception\AuthenticationException::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthenticationException::__construct方法的具体用法?PHP AuthenticationException::__construct怎么用?PHP AuthenticationException::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Security\Core\Exception\AuthenticationException的用法示例。


在下文中一共展示了AuthenticationException::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param mixed $user
  * @param \Exception $previous
  */
 public function __construct($user, Exception $previous = null)
 {
     $userString = $this->convertToString($user);
     if ($user instanceof UserInterface) {
         $message = sprintf('"%s" is an instance of UserInterface but is somewhat invalid.', $userString);
     } else {
         $message = sprintf('"%s" (%s) is not a valid user. Expected instance of UserInterface.', $userString, gettype($user));
     }
     return parent::__construct($message, $code = 0, $previous);
 }
开发者ID:kl3ryk,项目名称:symfony-facebook-authentication-bundle,代码行数:14,代码来源:InvalidUser.php

示例2: __construct

 /**
  * @param mixed         $userInfo Any info to be used to help registration
  * @param string        $message
  * @param integer       $code
  * @param \Exception    $previous
  */
 public function __construct($userInfo, $message = "", $code = 0, Exception $previous = null)
 {
     $this->userInformation = $userInfo;
     parent::__construct($message, $code, $previous);
 }
开发者ID:okwinza,项目名称:oauth2-client-bundle,代码行数:11,代码来源:FinishRegistrationException.php

示例3: __construct

 /**
  * @param string $apiKey
  * @param int $code
  * @param \Exception $previous
  */
 public function __construct($apiKey = '', $code = 0, \Exception $previous = null)
 {
     $message = sprintf('API key `%s` is invalid', $apiKey);
     parent::__construct($message, $code, $previous);
 }
开发者ID:jlekowski,项目名称:battleships-api,代码行数:10,代码来源:InvalidApiKeyException.php

示例4: __construct

 /**
  *
  */
 public function __construct()
 {
     parent::__construct("Client authentication required", 401);
 }
开发者ID:phppro,项目名称:silex-api,代码行数:7,代码来源:MissingClientIdentityException.php

示例5: __construct

 public function __construct(\Exception $previous)
 {
     parent::__construct((string) $previous, 0, $previous);
 }
开发者ID:KinaMarie,项目名称:connect,代码行数:4,代码来源:AuthenticationException.php

示例6: __construct

 /**
  *
  */
 public function __construct()
 {
     parent::__construct("Missing sudo privilege", 403);
 }
开发者ID:phppro,项目名称:silex-api,代码行数:7,代码来源:MissingSudoPrivilegeException.php

示例7: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($code = 0, Exception $previous = null)
 {
     parent::__construct('The user cancelled the authentication request', $code, $previous);
 }
开发者ID:littlerobot,项目名称:raven-bundle,代码行数:7,代码来源:AuthenticationCancelledException.php


注:本文中的Symfony\Component\Security\Core\Exception\AuthenticationException::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。