2017 © Pedro Peláez
 

library squeezed

An extension of the simple service container Pimple to provide tagging support.

image

jameshalsall/squeezed

An extension of the simple service container Pimple to provide tagging support.

  • Wednesday, February 4, 2015
  • by jaitsu
  • Repository
  • 1 Watchers
  • 2 Stars
  • 372 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Squeezed

An extension of the simple service container Pimple to provide tagging support., (*1)

Using Squeezed

Tagging a service

You can tag a service in the container by using the Squeezed::tagService(); method:, (*2)

$container = new Squeezed();
$container['some_service'] = new SomeService();
$container['another_service'] = new AnotherService();

$container->tagService('tag name', 'some_service');
$container->tagService('tag name', 'another_service');

Retrieving services by tag

Once you have tagged some services you can then retrieve them by their tag name. This is useful when dealing with categories of services such as console commands or controllers., (*3)

$taggedServices = $container->getByTag('tag name');

This will return an array of the tagged services indexed by their service ID., (*4)

Future Development

  • Add support for Pimple 2.0

The Versions

04/02 2015

dev-master

9999999-dev

An extension of the simple service container Pimple to provide tagging support.

  Sources   Download

The Requires

 

The Development Requires

04/02 2015

1.0.1

1.0.1.0

An extension of the simple service container Pimple to provide tagging support.

  Sources   Download

The Requires

 

The Development Requires

04/02 2015

1.0.0

1.0.0.0

An extension of the simple service container Pimple to provide tagging support.

  Sources   Download

The Requires

 

The Development Requires