2017 © Pedro Peláez
 

library data-container-interface

Interfaces for working with data containers

image

dhii/data-container-interface

Interfaces for working with data containers

  • Thursday, April 26, 2018
  • by XedinUnknown
  • Repository
  • 3 Watchers
  • 0 Stars
  • 5,855 Installations
  • PHP
  • 19 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 41 % Grown

The README.md

Dhii - Data - Container - Interface

Build Status Code Climate Test Coverage Latest Stable Version This package complies with Dhii standards, (*1)

Interfaces for working with data containers., (*2)

Details

This package introduces a couple of completely new interfaces for granularity, and extends the exceptions interfaces to make them more useful, while still sticking to the spirit of PSR-11., (*3)

Interfaces in this package extend those from [psr/container], the PSR-11 repository, where applicable. As such, the container itself, as well as the exceptions, are compatible with PSR-11, in the sense that it's possible to pass instances of the respective interfaces from this package where PSR-11 interfaces are expected., (*4)

At the same time, the interfaces of this package aim to be compatible with those of PSR-16. This means that theoretically, implementations of these interfaces should be usable as a cache storage - albeit, in the current state of PSR-16, with some adaptation. In theory, this should allow all data objects to be accessible in the same way, regardless of what they are used for., (*5)

This package also supports [dhii/stringable-interface]: anything that expects or returns a string key can also accept or return a [StringableInterface] respectively, in addition to a string. However, this is optional, and there is no dependency on that package; implementations are responsible for requiring dhii/stringable-interface themselves., (*6)

:book: Please see Wiki for detailed explanation., (*7)

Interfaces

  • [HasCapableInterface] - Allows checking for existence of data value by key.
  • [ContainerInterface] - Allows checking for and retrieval of data value by key.
  • [ContainerAwareInterface] - Allows retrieval of a container instance.
  • [SetCapableInterface] - Allows setting the value for a key.
  • [DeleteCapableInterface] - Allows deleting a value by key.
  • [ClearCapableInterface] - Allows deleting all values.
  • [ContainerFactoryInterface] - A factory that can create containers.
  • [ContainerExceptionInterface] - An exception that occurs in relation to a container, and is aware of that container.
  • [NotFoundExceptionInterface] - An exception that occurs when attempting to retrieve data for key that is not set, and is also container aware by extension.

Installation

composer require dhii/data-container-interface:^0.2, (*8)

The Versions

26/03 2018

dev-task/13_add-container-factory-interface

dev-task/13_add-container-factory-interface

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

21/03 2018
21/03 2018
30/01 2018

dev-fix/7_container-type-too-strict

dev-fix/7_container-type-too-strict

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

02/01 2018

dev-task/5_update-latest-practices

dev-task/5_update-latest-practices

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

28/08 2017

dev-task/3-extend-exception-interfaces

dev-task/3-extend-exception-interfaces

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

14/08 2017

dev-master

9999999-dev

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

14/08 2017

v0.1

0.1.0.0

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team

12/08 2017

dev-release/0.1

dev-release/0.1

Interfaces for working with data containers

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dhii Team