Download the PHP package dhii/data-container-interface without Composer
On this page you can find all versions of the php package dhii/data-container-interface. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dhii/data-container-interface
More information about dhii/data-container-interface
Files in dhii/data-container-interface
Package data-container-interface
Short Description Interfaces for working with data containers
License MIT
Informations about the package data-container-interface
[DEPRECATED] Dhii - Data - Container - Interface
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.
:book: Please see Wiki for detailed explanation.
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.SetCapableContainerInterface
- A container that can have a value set for a key.DeleteCapableInterface
- Allows deleting a value by key.DeleteCapableContainerInterface
- A container that allows deleting a value by key.ClearCapableInterface
- Allows deleting all values.ClearCapableContainerInterface
- A container that 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
All versions of data-container-interface with dependencies
psr/container Version ^1.0
dhii/factory-interface Version ^0.1-alpha1
dhii/exception-interface Version ^0.1 | ^0.2