2017 © Pedro Peláez
 

symfony-bundle resource-lock-bundle

Simple resource locking

image

aboutcoders/resource-lock-bundle

Simple resource locking

  • Wednesday, November 2, 2016
  • by aboutcoders
  • Repository
  • 2 Watchers
  • 4 Stars
  • 3,241 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Symfony Resource Lock Bundle

A Symfony bundle that provides resource lock implementation, (*1)

Build Status, (*2)

Installation

Add the AbcResourceLockBundle to your composer.json file, (*3)

{
    "require": {
        "aboutcoders/resource-lock-bundle": "dev-master"
    }
}

Include the bundle in the AppKernel.php class, (*4)

public function registerBundles()
{
    $bundles = array(
        // ...
        new Abc\Bundle\ResourceLockBundle\AbcResourceLockBundle(),
    );

    return $bundles;
}

Configuration

Configure the bundle, (*5)

``` yaml, (*6)

app/config/config.yml

abc_resource_lock: db_driver: orm, (*7)


You can define custom managers with a custom prefix within the `managers` section ``` yaml # app/config/config.yml abc_resource_lock: db_driver: orm managers: my_manager: prefix: my_prefix another_manager: prefix: another_prefix

Usage

Use Lock manager to get, set or check locks:, (*8)

``` php $container->get('abc.resource_lock.lock_manager');, (*9)


To retrieve the custom manager from the service container you have to specify it by its name: ``` php $container->get('abc.resource_lock.lock_manager_my_manager');

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions