katsew / checkpoint-php
Create whitelist and blacklist for the url route.
v0.1.0
2016-12-14 06:13 UTC
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2024-04-27 17:09:32 UTC
README
This is a module that create both whitelist and blacklist for url.
Usage
$checkpoint = new Checkpoint();
$checkpoint->setSafeBorders(['/path/which/always/pass/through']);
$checkpoint->setCheckpoints(['/path/which/not/pass/through', '/blacklisted']);
$can_pass_through = $checkpoint->canPassThrough('/hoge'); // will return true.
$can_pass_through = $checkpoint->canPassThrough('/blacklisted'); // will return false!