Germania KG · Prices
, (*1)
This package was destilled from legacy code!
You better do not want it to use this in production., (*2)
Installation
$ composer require germania-kg/prices
MySQL: This package requires a MySQL table germania_prices which you can install using germania_prices.sql in sql/ directory., (*3)
Usage
PdoPrices is a Callable for retrieving prices for any given article ID. It implements the container-interop (upcoming PSR 11 standard)., (*4)
has( 42 );
// Getting may throw NoPriceFoundException
// Interop\Container\Exception\NotFoundException)
$prices = $prices_factory->get( 42 );
// Avoid Exception using __invoke:
// Returns always array, may be empty:
$prices = $prices_factory( 42 );
?>
Development
$ git clone https://github.com/GermaniaKG/Prices.git
$ cd Prices
$ composer install
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:, (*5)
$ composer test
# or
$ vendor/bin/phpunit