Rate-limiting system, to prefent people form doing hacky stuff
This is the code documentation for the SproutCMS project
Search documentation |
class RateLimitRate-limiting system, to prefent people form doing hacky stuff
Extending this class<?php /** * New class description goes here * * @author Your Name, 2024-11-25 **/ class NewClassName extends RateLimit { /** * Log a hit against the rate-limit system **/ protected function logHit (string $event, bool $success, string $username) { // Method code goes here } /** * Return the number of hits matching given conditions for a given time period **/ public function getHitCount (array $conditions, int $time) { // Method code goes here } /** * Check that a given event has only been hit by the request ip address an allowable number of times **/ public function checkLimitIP (string $event, bool|null $success, int $limit, int $time) { // Method code goes here } /** * Log a failure hit against the rate-limit system (e.g. password incorrect) **/ public function logHitFailure (string $event, string $username) { // Method code goes here } /** * Log a successful hit against the rate-limit system (e.g. user was logged in) **/ public function logHitSuccess (string $event, string $username) { // Method code goes here } } ?> |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |