0 follower

Final Class Yiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException

InheritanceYiisoft\Hydrator\Exception\WrongConstructorArgumentsCountException » Yiisoft\Hydrator\Exception\NonInstantiableException » LogicException

Thrown when a class is not instantiable because of wrong constructor arguments count.

Method Details

Hide inherited methods

__construct() public method

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,
        )
    );
}