本文整理汇总了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);
}