Final Class Yiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException
| Inheritance | Yiisoft\ |
|---|
Thrown when a class is not instantiable because of wrong constructor arguments count.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
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,
),
);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.