Download the PHP package germania-kg/retailers without Composer
On this page you can find all versions of the php package germania-kg/retailers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download germania-kg/retailers
More information about germania-kg/retailers
Files in germania-kg/retailers
Package retailers
Short Description Work with Retailers: Interfaces, Traits, FilterIterator
License MIT
Informations about the package retailers
Germania KG · Retailers
Installation with Composer
Interfaces
RetailerNumberProviderInterface
RetailerNumberAwareInterface
Traits
RetailerNumberProviderTrait
Objects using this trait will provide a retailer_number
attribute and a getRetailerNumber
getter method, as outlined here:
RetailerNumberAwareTrait
Objects using this trait will provide anything that RetailerNumberProviderInterface provides, and additionally a setter method setRetailerNumber
which accepts anything; if RetailerNumberProviderInterface given here, getRetailerNumber method will be called to obtain the ID to use. Roughly outlined:
Examples
RetailerFilterIterator
The RetailerFilterIterator class accepts any Iterator collection and a retailer ID (or ID array) or RetailerNumberProviderInterface instance to filter for. Collection items not being an instance of RetailerNumberProviderInterface are always ignored.
Iterator:
- instances of RetailerNumberProviderInterface
Filter values:
- Integer or string ID
- Array of integer or string IDs
- One instance of RetailerNumberProviderInterface – also see issue #1
Example:
Roadmap
Version 2.1:
- Use Scalar type declarations; requires PHP 7.0+
Issues
- The RetailerFilterIterator should also accept an array of RetailerNumberProviderInterface instances as filter value. See issue #1.
Development
Unit tests
Either copy phpunit.xml.dist
to phpunit.xml
and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this: