https://github.com/brainbits/blocking
The Blocking Component provides methods to manage content based blocking.
https://github.com/brainbits/blocking
Last synced: 12 months ago
JSON representation
The Blocking Component provides methods to manage content based blocking.
- Host: GitHub
- URL: https://github.com/brainbits/blocking
- Owner: brainbits
- License: mit
- Created: 2013-03-12T11:28:37.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2025-03-27T17:02:43.000Z (about 1 year ago)
- Last Synced: 2025-03-27T18:22:22.866Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 143 KB
- Stars: 0
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
Blocking Component
==================
[](https://github.com/brainbits/blocking/releases)
[](LICENSE)
[](https://packagist.org/packages/brainbits/blocking)
[](https://github.com/brainbits/blocking/actions)
The Blocking Component provides methods to manage content based blocking.
```php
block($identity);
$result = $blocker->unblock($identity);
$result = $blocker->isBlocked($identity);
$block = $blocker->getBlock($identity);
```
Blocking Storage
----------------
The blocking storage is used to store the block information.
A file based blocking storage is provided.
It writes block-files to the filesystem, based on the blocking identifier.
Blocking Identity
-----------------
The blocking identity is used to identify the content that is being blocked.
A general purpose blocking identify is provided, that uses a string as an identifier.
Blocking Owner
--------------
The blocking owner is used to identify the user that created the block.
A symfony session based owner class is provided.
Blocking Validator
------------------
The blocking validator is used to test wether or not an existing block is still valid.
A validator that checks a block via last modification time is provided.