當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。