I have a db record exists validator that I call isValid on:
$checkUser=new Zend_Validate_Db_RecordExists(array(
"table"=>"xxx",
"field"=>"xxx"
));
$valid=$checkUser->isValid($userID);
Is there anyway I can get the returned row from the db when isValid() is true?
After typing this out I realize I could just query the db, if row exists, great, else its not valid. Still curious about what happens to the data returned from Db_RecordExists though.
From the source code of Zend_Validate_Db_RecordExists (Version 1.12):
So obviously
$result
is a local variable and consequently it cannot be accessed later on. If you want to achieve that, you could simply write your own validator basedZend_Validate_Db_Abstract
.