本文整理汇总了PHP中Symfony\Component\HttpKernel\Exception\NotFoundHttpException::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP NotFoundHttpException::__construct方法的具体用法?PHP NotFoundHttpException::__construct怎么用?PHP NotFoundHttpException::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpKernel\Exception\NotFoundHttpException
的用法示例。
在下文中一共展示了NotFoundHttpException::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param null $message
* @param \Exception $previous
* @param int $code
*/
public function __construct($message = null, \Exception $previous = null, $code = 0)
{
if ($message === null) {
$message = trans($this->message);
}
parent::__construct($message, $previous, $code);
}
示例2: __construct
public function __construct($message = null, \Exception $previous = null, $code = 0, $adminContext = false)
{
$this->adminContext = $adminContext;
parent::__construct($message, $previous, $code);
}
示例3: __construct
public function __construct()
{
parent::__construct('variant_not_found');
}
示例4: __construct
public function __construct($id)
{
parent::__construct(sprintf("Form %d not found", $id));
}
示例5: __construct
public function __construct($message = null, \Exception $previous = null, $code = 0)
{
parent::__construct(trans(PasswordBroker::INVALID_USER), $previous, $code);
}
示例6: __construct
public function __construct($message = "We could not found what you were looking for", \Exception $previous = null, $code = 0)
{
parent::__construct($message, $previous, $code);
}
示例7: __construct
/**
* Constructor
*
* @param int $id
*/
public function __construct($id)
{
$msg = sprintf('Order with ID "%s" was not found.', $id);
parent::__construct($msg);
}
示例8: __construct
/**
* InvalidPaymentTokenException constructor.
*
* @param null|string $token
*/
public function __construct($token)
{
$msg = sprintf('Payment for given token "%s" was not found', $token);
parent::__construct($msg);
}
示例9: __construct
public function __construct($message = null, \Exception $previous = null, $code = 0)
{
$message = is_null($message) ? trans('Not Found') : $message;
parent::__construct($message, $previous, $code);
}
示例10: __construct
public function __construct($name)
{
parent::__construct(sprintf("Builder '%s' not found", $name));
}
示例11: __construct
/**
* Constructor
*
* @param string $message Error message
* @param \Exception $prev Previous Exception
*/
public function __construct($message = "Not Found", $prev = null)
{
parent::__construct($message, $prev);
}
示例12: __construct
/**
* An enhanced constructor that allows for passing the default \Exception parameters, as well as an array of additional
* attributes followed by any number of additional arguments that will be passed to sprintf against the message.
*
* @param string|null $message An error message string (optionally fed to sprintf if optional args are given)
* @param int|null $code The error code (which should be from ORMExceptionInterface). If null, the value
* of ExceptionInterface::CODE_GENERIC will be used.
* @param mixed $previous The previous exception (when re-thrown within another exception), if applicable.
* @param mixed[]|null $attributes An optional array of attributes to pass. Will be provided in the debug output.
* @param mixed ...$sprintfArgs Optional additional parameters that will be passed to sprintf against the
* message string provided.
*/
public function __construct($message = null, $code = null, $previous = null, array $attributes = null, ...$sprintfArgs)
{
parent::__construct($this->getFinalCode((int) $code), $this->getFinalMessage((string) $message, ...$sprintfArgs), $this->getFinalPrevious($previous), $attributes, $this->getFinalCode((int) $code));
$this->setAttributes((array) $attributes);
}
示例13: __construct
/**
* @param string $application
*/
public function __construct($application)
{
parent::__construct(sprintf('Application with name "%s" not found', $application));
}