Skip to content

API reference

phil/bot-detection-bundle

Every public type of the bundle, by layer, with its role and state. Namespaces are relative to Phil\BotDetectionBundle.

Bundle

TypeRoleState
PhilBotDetectionBundleThe bundle class; extension alias phil_bot_detectionNo service, no configuration (configuration.md)

Domain

TypeRoleState
Domain\Verdict\VerdictString-backed enum Human (human), Robot (robot), Unknown (unknown); fromSubmitted(?string): self, strict and never throwing; isRobot()Implemented and tested (verdict.md)
Domain\Friction\FrictionPure enum None, Step, with no refusal case; adds()Implemented and tested (friction.md)
Domain\Friction\FrictionPolicyrobotOnly(), robotOrUnknown(), frictionFor(Verdict): Friction; public unknownAddsFrictionImplemented and tested (friction.md)
Domain\Counter\RobotVerdictCounterInterface: increment(): void, without argumentPort only (extension-points.md)

Application

TypeRoleState
Application\VerdictHandler__construct(FrictionPolicy, RobotVerdictCounter), handle(Verdict): Friction: counts a robot verdict and returns the frictionImplemented and tested (verdict-handling.md)

Browser

FileRoleState
assets/src/verdict_controller.jsThe verdict Stimulus controller: runs the detectors and leaves human or robot on the root element and in its fieldImplemented, tested with Node
assets/src/detectors.jsThe detectors and their combination into one verdictImplemented, tested with Node; no third-party code included

Not yet in the skeleton

PieceState
The signals of the design not written yet (rewritten native functions, the window against a worker, permissions, speech voices, WebRTC, hardware and screen consistency)Not written (browser-signals.md)
Services, configuration, a Twig helper for the controllerNot written