Xpressengine\Support\Exceptions\XpressengineException::__construct PHP Méthode

__construct() public méthode

message는 이 클래스를 상속받는 클래스를 정의할 때 $message 필드에 지정해야 한다
public __construct ( array $args = [], integer $code, Exception $previous = null )
$args array message 변환시 사용될 변수 목록
$code integer The Exception code.
$previous Exception The previous exception used for the exception chaining. Since 5.3.0
    public function __construct(array $args = [], $code = 0, Exception $previous = null)
    {
        $this->args = $args;
        $message = $this->makeMessage();
        parent::__construct($message, $code, $previous);
    }

Usage Example

 /**
  * HttpXpressengineException constructor.
  *
  * @param array           $args       arguments array
  * @param int             $statusCode exception status code
  * @param \Exception|null $previous   exception
  * @param array           $headers    header
  * @param int             $code       code
  */
 public function __construct($args = [], $statusCode = null, \Exception $previous = null, array $headers = [], $code = 0)
 {
     if ($statusCode !== null) {
         $this->statusCode = $statusCode;
     }
     $this->headers = $headers;
     parent::__construct($args, $code, $previous);
 }
All Usage Examples Of Xpressengine\Support\Exceptions\XpressengineException::__construct