dhii/data-container-interface

This package is abandoned and no longer maintained. The author suggests using the dhii/collections-interface package instead.

Interfaces for working with data containers

v0.2.1-alpha1 2019-05-10 14:17 UTC

This package is auto-updated.

Last update: 2020-03-11 15:05:36 UTC


README

Build Status Code Climate Test Coverage Latest Stable Version This package complies with Dhii standards

Interfaces for working with data containers.

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.

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.

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.

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.

📖 Please see Wiki for detailed explanation.

Interfaces

Installation

composer require dhii/data-container-interface:^0.2