Itsy-bitsy honey pot utility.
$ composer require ssitu/winnipeg
Will also require SSITU/Blueprints
FlexLogsTrait
andFlexLogsInterface
specifically.
This is a Psr-3 "logger aware" implementation with a fallback.
If no use of other SSITU blueprints, you can download just those two files.
Field id can be set for a Winnipeg instance, or on method call, or not set at all --default field id is: fluffandstuff
.
use SSITU\Winnipeg\Winnipeg;
require_once '/path/to/vendor/autoload.php';
$Winnipeg = new Winnipeg();
# or
$fieldId = 'jovialTastiness';
$Winnipeg = new Winnipeg($fieldId);
# or
$Winnipeg = new Winnipeg();
$Winnipeg->setFieldId($fieldId);
# optional:
$Winnipeg->setLogger($somePsr3Logger);
$htmlField = $Winnipeg->getHoneyPotHtml();
$css = $Winnipeg->getHoneyPotCss();
$isHoneyPotEmpty = $Winnipeg->honeyPotIsEmpty();
# or
$htmlField = $Winnipeg->getHoneyPotHtml($fieldId);
$css = $Winnipeg->getHoneyPotCss($fieldId);
$isHoneyPotEmpty = $Winnipeg->honeyPotIsEmpty($fieldId);
if(!$isHoneyPotEmpty){
$data = $Winnipeg->getLocalLogs();
# or check your own logger, if one was set
}
Sure! You can take a loot at CONTRIBUTING.
This project is under the MIT License; cf. LICENSE for details.