本文整理匯總了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);
}
示例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);
}
示例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);
}
示例4: __construct
/**
*
*/
public function __construct()
{
parent::__construct("Client authentication required", 401);
}
示例5: __construct
public function __construct(\Exception $previous)
{
parent::__construct((string) $previous, 0, $previous);
}
示例6: __construct
/**
*
*/
public function __construct()
{
parent::__construct("Missing sudo privilege", 403);
}
示例7: __construct
/**
* {@inheritdoc}
*/
public function __construct($code = 0, Exception $previous = null)
{
parent::__construct('The user cancelled the authentication request', $code, $previous);
}