Download the PHP package tobento/service-country without Composer
On this page you can find all versions of the php package tobento/service-country. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package service-country
Country Service
A country interface for PHP applications.
Table of Contents
- Getting started
- Requirements
- Highlights
- Documentation
- Country Repository
- Country Repository Interface
- Country
- Create Country
- Country Factory
- Country Interface
- Countries
- Create Countries
- Countries Factory
- Countries Interface
- Credits
Getting started
Add the latest version of the country service project running this command.
Requirements
- PHP 8.0 or greater
Highlights
- Framework-agnostic, will work with any project
- Decoupled design
Documentation
Country Repository
The country repository loads the countries from json files.
Country Repository Interface
findCountry
Returns a single country by the specified parameters or null if not found.
Check out the Country Interface to learn more about the interface.
findCountries
Returns all countries found by the specified parameters.
Check out the Countries Interface to learn more about the interface.
Country
Create Country
Check out the Country Interface to learn more about the interface.
Country Factory
Easily create a country with the provided countryfactory:
createCountry
Parameters:
createCountryFromArray
Country Interface
with methods
The with methods will return a new instance.
Countries
Create Countries
Check out Countries Interface to learn more about the interface.
Countries Factory
Easily create a Countries object with the provided countries factory:
createCountries
Check out Countries Interface to learn more about the interface.
createCountriesFromArray
Check out Countries Interface to learn more about the interface.
Countries Interface
addCountry
Adds a country.
addCountries
sort
Returns a new instance with the countries sorted.
filter
Returns a new instance with the filtered countries.
code
Returns a new instance with the specified code filtered.
locale
Returns a new instance with the specified locale filtered.
group
Returns a new instance with the specified group filtered.
region
Returns a new instance with the specified region filtered.
continent
Returns a new instance with the specified continent filtered.
all
Returns all countries.
first
Returns the first country or null if none.
get
Returns the first country found by code, code3, numericCode and/or locale.
column
Returns the column of the countries.
groupedColumn
Returns the column of the countries grouped.
only
Returns a new instance with countries with only the codes specified.
except
Returns a new instance with countries except the codes specified.
map
Returns a new instance with the countries mapped.
Credits
- Tobias Strub
- All Contributors
All versions of service-country with dependencies
tobento/service-collection Version ^1.0
tobento/service-support Version ^1.0