2017 © Pedro Peláez
 

library country

A PHP library of countries and flags.

image

delboy1978uk/country

A PHP library of countries and flags.

  • Sunday, January 7, 2018
  • by delboy1978uk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 547 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 21 % Grown

The README.md

country

Latest Stable Version Total Downloads Latest Unstable Version License
build status Code Coverage Scrutinizer Code Quality
A countries and flags library in PHP., (*1)

installation

Install via composer into your project:, (*2)

composer require delboy1978uk/country

usage

factory

You can call CountryFactory::generate($code) to create a country object, (*3)

public static function generate(string $id): Country;

entity

public function __toString();
public function getFlag(): string;
public function getId(): string;
public function getIso(): string;
public function getName(): string;
public function getNumCode(): int;
public function setFlag(string $flag): void;
public function setId(string $id): void
public function setIso(string $iso): void;
public function setName(string $name): void;
public function setNumCode(int $numCode): void;
public function toArray(): array;

trait

You can use HasCountryTrait to add a country to your object (also works with doctrine), (*4)

public function getCountry(): Country;
public function setCountry(Country $country): void;

flag image helper

You can call Flag::render($country, $size), where size can be one of tiny, small, medium, or large. php public static function render(Country $country, $size), (*5)

The Versions

07/01 2018

dev-master

9999999-dev

A PHP library of countries and flags.

  Sources   Download

MIT

The Requires

 

The Development Requires

07/01 2018

v1.0.3

1.0.3.0

A PHP library of countries and flags.

  Sources   Download

MIT

The Requires

 

The Development Requires

07/01 2018

v1.0.2

1.0.2.0

A PHP library of countries and flags.

  Sources   Download

MIT

The Requires

 

The Development Requires

07/01 2018

v1.0.1

1.0.1.0

A PHP library of countries and flags.

  Sources   Download

MIT

The Requires

 

The Development Requires

30/10 2015

v1.0.0

1.0.0.0

A PHP library of countries and flags.

  Sources   Download

MIT

The Requires

 

The Development Requires