dravencms / icaptcha
Captcha interface for dravencms
0.0.2
2024-08-11 14:33 UTC
Requires
- php: >=8.1
- nette/di: ^3.1.8
- nette/forms: ^3.1.14
- nette/utils: ^4.0.3
This package is auto-updated.
Last update: 2026-08-24 22:38:56 UTC
README
Provider contracts shared by the DravenCMS CAPTCHA integration and its concrete adapters. Applications normally install dravencms/captcha and one provider rather than using this library directly.
Contracts
ICaptchaProvidercreates a form field throughprepareField().ICaptchaFieldextends the Nette Forms control contract withverify()and the methods needed for validation and rendering.
Installation
composer require dravencms/icaptcha
Implementing a Provider
Implement Dravencms\Captcha\ICaptchaProvider and return a control implementing Dravencms\Captcha\Forms\ICaptchaField:
final class CaptchaProvider implements ICaptchaProvider { public function prepareField(string $label, ?string $message = null): ICaptchaField { return new CaptchaField($this, $label, $message); } }
Provider packages should expose their implementation as a DI service and declare that they provide dravencms/captcha-implementation in Composer metadata.
License
This package is licensed under the LGPL-3.0 license.