2017 © Pedro Peláez
 

library blocking

Object blocking

image

brainbits/blocking

Object blocking

  • Tuesday, December 19, 2017
  • by temp
  • Repository
  • 5 Watchers
  • 0 Stars
  • 9,768 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 4 % Grown

The README.md

Blocking Component

Latest Version Software License Total Downloads Tests, (*1)

The Blocking Component provides methods to manage content based blocking., (*2)

<?php

use Brainbits\Blocking\Blocker;
use Brainbits\Blocking\Identity\Identity;
use Brainbits\Blocking\Owner\SymfonySessionOwnerFactory;
use Brainbits\Blocking\Storage\FilesystemStorage;
use Brainbits\Blocking\Validator\ExpiredValidator;

$storage = new FilesystemStorage('/where/to/store/blocks' /* path to directory on filesystem */);
$ownerFactory = new SymfonySessionOwnerFactory($session /* symfony session */);
$validator = new ExpiredValidator(300 /* block will expire after 300 seconds */);

$blocker = new Blocker($storage, $ownerFactory, $validator);

$identity = new Identity('my_content_123');

$block = $blocker->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., (*3)

A file based blocking storage is provided. It writes block-files to the filesystem, based on the blocking identifier., (*4)

Blocking Identity

The blocking identity is used to identify the content that is being blocked., (*5)

A general purpose blocking identify is provided, that uses a string as an identifier., (*6)

Blocking Owner

The blocking owner is used to identify the user that created the block., (*7)

A symfony session based owner class is provided., (*8)

Blocking Validator

The blocking validator is used to test wether or not an existing block is still valid., (*9)

A validator that checks a block via last modification time is provided., (*10)

The Versions

19/12 2017

dev-master

9999999-dev http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

async block blocking

19/12 2017

3.0.1

3.0.1.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

async block blocking

30/10 2017

3.0.0

3.0.0.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

async block blocking

22/12 2015

2.0.1

2.0.1.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

async block blocking

21/12 2015

2.0.0

2.0.0.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

async block blocking

03/04 2013

1.0.1

1.0.1.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

 

The Development Requires

  • mikey179/vfsstream 1.1.*

03/04 2013

1.0.2

1.0.2.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires

 

The Development Requires

  • mikey179/vfsstream 1.1.*

12/03 2013

1.0.0

1.0.0.0 http://brainbits.net

Object blocking

  Sources   Download

MIT

The Requires