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


PHP RuntimeException::__construct方法代码示例

本文整理汇总了PHP中RuntimeException::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP RuntimeException::__construct方法的具体用法?PHP RuntimeException::__construct怎么用?PHP RuntimeException::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RuntimeException的用法示例。


在下文中一共展示了RuntimeException::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param \Exception $e
  * @param \Carrooi\Doctrine\Entities\BaseEntity $entity
  * @param string $column
  * @param mixed $value
  */
 public function __construct(Exception $e, BaseEntity $entity, $column, $value)
 {
     $this->entity = $entity;
     $this->column = $column;
     $this->value = $value;
     parent::__construct($e->getMessage(), $e->getCode(), $e);
 }
开发者ID:carrooi,项目名称:doctrine,代码行数:13,代码来源:exceptions.php

示例2: __construct

 public function __construct($method, array $allowedMethods, \Exception $previous = null)
 {
     $message = sprintf('Method "%s" is not allowed and must be one of "%s".', $method, implode(', ', $allowedMethods));
     parent::__construct($message, 0, $previous);
     $this->method = $method;
     $this->allowedMethods = $allowedMethods;
 }
开发者ID:RomainOliva,项目名称:projetFramework,代码行数:7,代码来源:MethodNotAllowedException.php

示例3: __construct

 /**
  * Public constructor.
  */
 public function __construct()
 {
     $message = 'You must authenticate to access this resource.';
     $code = 401;
     $this->statusCode = $code;
     parent::__construct($message, $code);
 }
开发者ID:marcelbonnet,项目名称:slim-auth,代码行数:10,代码来源:HttpUnauthorizedException.php

示例4: __construct

 /**
  *
  * @param string $message
  * @param integer $statusCode
  * @param \Exception $previous
  * @param array $errors
  * @param array $headers
  */
 public function __construct($message, $statusCode = 0, \Exception $previous = null, array $errors = [], array $headers = [])
 {
     $this->statusCode = $statusCode;
     $this->headers = $headers;
     $this->errors = $errors;
     parent::__construct($message, $statusCode, $previous);
 }
开发者ID:Temsi,项目名称:php-hypermedia-api,代码行数:15,代码来源:APIException.php

示例5: __construct

 public function __construct($message = "", $code = 403, Exception $previous = null)
 {
     if (empty($message)) {
         $message = \JText::_('LIB_FOF_VIEW_POSSIBLYSUHOSIN');
     }
     parent::__construct($message, $code, $previous);
 }
开发者ID:Joal01,项目名称:fof,代码行数:7,代码来源:PossiblySuhosin.php

示例6: WrongTypeException

 public function WrongTypeException($msg = null)
 {
     if (is_null($msg)) {
         $msg = "Tipo inválido";
     }
     parent::__construct($msg);
 }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:7,代码来源:WrongTypeException.php

示例7: __construct

 /**
  * Create an exception based on LibXMLError objects
  *
  * @param array $errors Array of LibXMLError objects
  * @see http://www.php.net/manual/en/class.libxmlerror.php
  */
 public function __construct(array $errors)
 {
     $numErrors = count($errors);
     if (1 == $numErrors) {
         $message = "An error occurred ";
     } elseif ($numErrors > 1) {
         $message = "Some errors occurred ";
     }
     $message .= "while parsing XML configuration file:\n";
     foreach ($errors as $error) {
         $message .= " - ";
         switch ($error->level) {
             case LIBXML_ERR_WARNING:
                 $message .= "Warning {$error->code}: ";
                 break;
             case LIBXML_ERR_ERROR:
                 $message .= "Error {$error->code}: ";
                 break;
             case LIBXML_ERR_FATAL:
                 $message .= "Fatal Error {$error->code}: ";
                 break;
         }
         $message .= $error->message;
     }
     parent::__construct($message);
 }
开发者ID:disider,项目名称:Propel2,代码行数:32,代码来源:XmlParseException.php

示例8: __construct

 /**
  * @param string $message
  * @param string $actorId
  * @param \DateTimeInterface $sinceDate
  * @param \DateTimeInterface $actualDate
  */
 public function __construct($message, $actorId, \DateTimeInterface $sinceDate, \DateTimeInterface $actualDate)
 {
     parent::__construct($message);
     $this->actorId = $actorId;
     $this->sinceDate = $sinceDate;
     $this->actualDate = $actualDate;
 }
开发者ID:cultuurnet,项目名称:udb3-udb2-bridge,代码行数:13,代码来源:OutdatedXmlRepresentationException.php

示例9: __construct

 /**
  * Creates an instance.
  *
  * @param string     $optionKey
  * @param int        $target
  * @param \Exception $previous
  */
 public function __construct($optionKey, $target, \Exception $previous = null)
 {
     $this->optionKey = $optionKey;
     $this->target = $target;
     $message = sprintf('Missing value for option "%s" in "%s"', $optionKey, $this->getTargetFQCN());
     parent::__construct($message, 0, $previous);
 }
开发者ID:utrenkner,项目名称:YAWIK,代码行数:14,代码来源:MissingOptionException.php

示例10: __construct

 public function __construct($message = NULL, $code = 0, \Exception $previous = NULL)
 {
     if (!isset($message)) {
         $message = "rowCount() is supported for DELETE, INSERT, or UPDATE statements performed with structured query builders only, since they would not be portable across database engines otherwise. If the query builders are not sufficient, set the 'return' option to Database::RETURN_AFFECTED to get the number of affected rows.";
     }
     parent::__construct($message, $code, $previous);
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:7,代码来源:RowCountException.php

示例11: __construct

 public function __construct($errorCode, $message, $requestId, $hostId)
 {
     parent::__construct($message);
     $this->requestId = $requestId;
     $this->hostId = $hostId;
     $this->errorCode = $errorCode;
 }
开发者ID:a07061625,项目名称:upload,代码行数:7,代码来源:ServiceException.php

示例12: App42Exception3

 public function App42Exception3($detailMessage, $httpErrorCode, $appErrorCode)
 {
     $this->detailMessage = $detailMessage;
     $this->httpErrorCode = $httpErrorCode;
     $this->appErrorCode = $appErrorCode;
     return parent::__construct($detailMessage, $httpErrorCode);
 }
开发者ID:murnieza,项目名称:App42_PHP_SDK,代码行数:7,代码来源:App42Exception.php

示例13: __construct

 public function __construct($name, $value = null, $message = null, $code = 0, \Exception $prevException = null)
 {
     $this->argumentName = $name;
     $this->argumentValue = $value;
     $message = $message ?: sprintf('The argument for "%s" is invalid.', $name);
     parent::__construct($message, $code, $prevException);
 }
开发者ID:deepfreeze,项目名称:stream,代码行数:7,代码来源:InvalidArgumentException.php

示例14: __construct

 public function __construct($invalidHelper, array $supportedHelpers, \Exception $previous = null)
 {
     $message = sprintf('Unsupported helper "%s". It must be one of %s.', $invalidHelper, implode(', ', $supportedHelpers));
     parent::__construct($message, 0, $previous);
     $this->invalidHelper = $invalidHelper;
     $this->supportedHelpers = $supportedHelpers;
 }
开发者ID:Symfomany,项目名称:laravelcinema,代码行数:7,代码来源:UnsupportedHelperException.php

示例15: WrongTypeException

 public function WrongTypeException($msg = null)
 {
     if ($msg == null) {
         $msg = "Esta planilha contem um formato inválido de acordo com os padrões definidos.";
     }
     parent::__construct($msg);
 }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:7,代码来源:WrongFormatException.php


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