8
0
Mirror von https://git.d3data.de/3rdParty/captcha-module.git synchronisiert 2024-11-16 03:33:12 +01:00
captcha-module/controllers/oecaptchacontact.php
2016-03-08 14:47:59 +01:00

45 Zeilen
828 B
PHP

<?php
/**
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
*/
class oeCaptchaContact extends oeCaptchaContact_parent
{
/**
* Class handling CAPTCHA image.
*
* @var object
*/
protected $captcha = null;
/**
* Composes and sends user written message, returns false if some parameters
* are missing.
*
* @return bool
*/
public function send()
{
if (!$this->getCaptcha()->passCaptcha()) {
return false;
}
return parent::send();
}
/**
* Template variable getter. Returns object of handling CAPTCHA image
*
* @return object
*/
public function getCaptcha()
{
if ($this->captcha === null) {
$this->captcha = oxNew('oeCaptcha');
}
return $this->captcha;
}
}