An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

Blocking Component
==================

[![Latest Version](https://img.shields.io/github/release/brainbits/blocking.svg?style=flat-square)](https://github.com/brainbits/blocking/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Total Downloads](https://img.shields.io/packagist/dt/brainbits/blocking.svg?style=flat-square)](https://packagist.org/packages/brainbits/blocking)
[![Tests](https://github.com/brainbits/blocking/actions/workflows/test.yml/badge.svg)](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.