katsew/checkpoint-php

Create whitelist and blacklist for the url route.

Maintainers

Package info

github.com/katsew/checkpoint-php

pkg:composer/katsew/checkpoint-php

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v0.1.0 2016-12-14 06:13 UTC

This package is not auto-updated.

Last update: 2026-03-01 04:40:20 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!