2017 © Pedro Peláez
 

library country-flags

Provides access to various country flags

image

shiftpi/country-flags

Provides access to various country flags

  • Sunday, November 2, 2014
  • by shiftpi
  • Repository
  • 1 Watchers
  • 2 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Code Climate, (*1)

ShiftpiCountryFlags

Provides access to various country flags, (*2)

Installation

Using Composer

Require shiftpi/country-flags in your composer.json. Then update your dependencies. You can now enable the module in the config/application.config.php file:, (*3)

// ...
'modules' => array(
    // ...
    'ShiftpiCountryFlags',
    // ...
),
// ...

If you are using Windows, make sure php_fileinfo.dll is loaded., (*4)

Configuration

Copy vendor/shiftpi/country-flags/config/shiftpicountryflags.global.php.dist to config/autoload/shiftpicountryflags.global.php., (*5)

Edit the configuration file (if needed):, (*6)

return array(
    'countryflags' => array(
        'mapper' => 'ShiftpiCountryFlags\Mapper\Filename',      // country code -> file path mapper
        'datapath' => '/alternative/data/path',                 // new since 0.1.1; optional
    ),
);

Usage

Route

By default the module provides a route to access the flags:, (*7)

/countryflags/<countrycode>[/<size>]

Where countrycode is the ISO 3166 ALPHA-2 code (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). Size defines the width and height of the flag in px. Possible values are 16, 24, 32, 48, 64. Default is 16., (*8)

View Helper

<img src="<?php echo $this->countryFlagUrl('SC', 64) ?>" alt="Seychelles" width="64" />

Where the second parameter (size) is optional (default 16)., (*9)

License

Licensed under the MIT license. See license file. The flag icons are from http://www.gosquared.com/ (licensed under the MIT license, too)., (*10)

The Versions

02/11 2014

dev-master

9999999-dev https://github.com/shiftpi/CountryFlags

Provides access to various country flags

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 flags countries

23/07 2014

0.1.2

0.1.2.0 https://github.com/shiftpi/CountryFlags

Provides access to various country flags

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 flags countries

23/07 2014

0.1.2.x-dev

0.1.2.9999999-dev https://github.com/shiftpi/CountryFlags

Provides access to various country flags

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 flags countries

09/06 2014

0.1.1

0.1.1.0 https://github.com/shiftpi/CountryFlags

Provides access to various country flags

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 flags countries

24/05 2014

0.1.0

0.1.0.0 https://github.com/shiftpi/CountryFlags

Provides access to various country flags

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 flags countries