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


PHP NotFoundHttpException::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:Adamzynoni,项目名称:mybb2,代码行数:12,代码来源:PollNotFoundException.php

示例2: __construct

 public function __construct($message = null, \Exception $previous = null, $code = 0, $adminContext = false)
 {
     $this->adminContext = $adminContext;
     parent::__construct($message, $previous, $code);
 }
开发者ID:vigourouxjulien,项目名称:thelia,代码行数:5,代码来源:NotFountHttpException.php

示例3: __construct

 public function __construct()
 {
     parent::__construct('variant_not_found');
 }
开发者ID:Nebo15,项目名称:gandalf.api,代码行数:4,代码来源:VariantNotFound.php

示例4: __construct

 public function __construct($id)
 {
     parent::__construct(sprintf("Form %d not found", $id));
 }
开发者ID:ninsuo,项目名称:GenyBundle,代码行数:4,代码来源:FormNotFoundException.php

示例5: __construct

 public function __construct($message = null, \Exception $previous = null, $code = 0)
 {
     parent::__construct(trans(PasswordBroker::INVALID_USER), $previous, $code);
 }
开发者ID:AudithSoftworks,项目名称:Basis-API,代码行数:4,代码来源:UserNotFoundException.php

示例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);
 }
开发者ID:joselfonseca,项目名称:laravel-api-tools,代码行数:4,代码来源:ApiModelNotFoundException.php

示例7: __construct

 /**
  * Constructor
  *
  * @param int $id
  */
 public function __construct($id)
 {
     $msg = sprintf('Order with ID "%s" was not found.', $id);
     parent::__construct($msg);
 }
开发者ID:Sywooch,项目名称:WellCommerce,代码行数:10,代码来源:OrderNotFoundException.php

示例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);
 }
开发者ID:wellcommerce,项目名称:wellcommerce,代码行数:10,代码来源:InvalidPaymentTokenException.php

示例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);
 }
开发者ID:bugotech,项目名称:http,代码行数:5,代码来源:NotFoundHttpException.php

示例10: __construct

 public function __construct($name)
 {
     parent::__construct(sprintf("Builder '%s' not found", $name));
 }
开发者ID:ninsuo,项目名称:GenyBundle,代码行数:4,代码来源:BuilderNotFoundException.php

示例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);
 }
开发者ID:alebon,项目名称:graviton,代码行数:10,代码来源:NotFoundException.php

示例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);
 }
开发者ID:scr-be,项目名称:mantle-bundle,代码行数:17,代码来源:NotFoundHttpException.php

示例13: __construct

 /**
  * @param string $application
  */
 public function __construct($application)
 {
     parent::__construct(sprintf('Application with name "%s" not found', $application));
 }
开发者ID:aboutcoders,项目名称:logger-bundle,代码行数:7,代码来源:ApplicationNotFoundException.php


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