protected function findCaptchaControl()
{
if (($id = $this->getCaptchaControl()) === '') {
throw new TConfigurationException('captchavalidator_captchacontrol_required');
} else {
if (($control = $this->findControl($id)) === null) {
throw new TConfigurationException('captchavalidator_captchacontrol_inexistent', $id);
} else {
if (!$control instanceof TCaptcha) {
throw new TConfigurationException('captchavalidator_captchacontrol_invalid', $id);
} else {
return $control;
}
}
}
}