Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ArgumentTypeException.php
1<?php
2
3declare(strict_types=1);
4
6
8{
9 protected mixed $requiredType;
10
11 public function __construct(string $parameter, mixed $requiredType = '', \Exception $previous = null)
12 {
13 if (!empty($requiredType))
14 {
15 $message = sprintf("The value of an argument '%s' must be of type %s", $parameter, $requiredType);
16 }
17 else
18 {
19 $message = sprintf("The value of an argument '%s' has an invalid type", $parameter);
20 }
21
22 $this->requiredType = $requiredType;
23
24 parent::__construct($message, $parameter, $previous);
25 }
26
27 public function getRequiredType(): mixed
28 {
30 }
31}
__construct(string $parameter, mixed $requiredType='', \Exception $previous=null)