captcha-module/Application/Shared/Captcha.php

22 lines
420 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace OxidProfessionalServices\Captcha\Application\Shared;
use OxidProfessionalServices\Captcha\Application\Core\Captcha as CaptchaCore;
trait Captcha
{
protected ?CaptchaCore $captcha;
public function getCaptcha(): CaptchaCore
{
if (!$this->captcha) {
$this->captcha = CaptchaCore::getInstance();
}
return $this->captcha;
}
}