Final Class Yiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException
| Inheritance | Yiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException » Yiisoft\Hydrator\Exception\NonInstantiableException » LogicException |
|---|
Thrown when a class is not instantiable because of wrong constructor arguments count.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException |
Method Details
| public mixed __construct ( ReflectionMethod $constructor, integer $countArguments ) | ||
| $constructor | ReflectionMethod | |
| $countArguments | integer | |
public function __construct(ReflectionMethod $constructor, int $countArguments)
{
parent::__construct(
sprintf(
'Class "%s" cannot be instantiated because it has %d required parameters in constructor, but passed only %d.',
$constructor->getDeclaringClass()->getName(),
$constructor->getNumberOfRequiredParameters(),
$countArguments,
)
);
}
Signup or Login in order to comment.