Because you define a __construct
method for your validator class, the parent __construct
is not implicitly called:
http://php.net/manual/en/language.oop5.decon.php (see the note)
You should modify your __construct
method:
public function __construct($dbAdapter)
{
$this->dbAdapter = $dbAdapter;
//parent::__construct($options);
parent::__construct(null); // or (void)
}
As you can see, $messageTemplates
and $messageVariables
are "loaded" from AbstractValidator::__construct
, for being used in some methods ( error
included):