mnavarrocarter / countries
This package is abandoned and no longer maintained.
No replacement package was suggested.
A library for working with Countries in a object oriented way
dev-master
2018-09-04 18:38 UTC
Requires
- php: ^7.1
- ext-json: *
- psr/simple-cache: ^1.0
- symfony/config: ^4.1
- symfony/dependency-injection: ^4.1
- symfony/framework-bundle: ^4.1
Requires (Dev)
- ext-redis: *
- cache/redis-adapter: ^1.0
- doctrine/doctrine-bundle: ^1.9
- doctrine/orm: ^2.6
- friendsofphp/php-cs-fixer: ^2.12
- symfony/http-kernel: ^4.1
- symfony/phpunit-bridge: ^4.1
- symfony/var-dumper: ^4.1
- symfony/yaml: ^4.1
This package is auto-updated.
Last update: 2020-11-20 12:25:36 UTC
README
A PHP library for working with Country information as objects, consumed from https://restcountries.eu/.
Installation
Install is done via composer:
composer require mnavarrocarter/countries
Usage
The Country Fetcher
The CountryRepositoryInterface
The CountryCollection object
Doctrine Integration
This library contains a doctrine repository implementing the CountryRepository and doctrine mappings for the different objects that compose the Country aggregate root.
Symfony Bundle Config
This library is also bridged to be used a Symfony Bundle. You can customize almost every aspect of the workings of the library, like defining the default Repository to use, and configuring other options like caching.
mnc_countries: repository: # Alias to the interface default: mnc_countries.in_memory_repository # If true, the default one will be DoctrineCountryRepository use_doctrine: true fetcher: # Alias to the interface default: mnc_countries.object_fetcher # If true, the default one will be CacheCountryFectherDecorator use_cache_decorator: true # Cache service id. Redis is pretty efficient. cache: Psr\SimpleCache\CacheInterface