zendframework/zf2 — pull request #4127 by mwillbanks (2013-03-27 14:22:55+00:00)
Title: Added I18n PhoneNumber validator based off of country

I am breaking off items from #3884 to make it easier to be able to merge each individually. Please see original PR for several notes. None were given on phone number implementation.

### Phone Number
The Phone Number validator is based on libPhoneNumber's XML file. It is a multi-dimensional hash that takes the country code as a key then several subkeys for possible types, national types and separated by types of numbers. The country is primarily used so that you will only need to validate against a subset of items. A country is required.
*Basic Usage:*
```php
$validator = new \Zend\I18n\Validator\PhoneNumber();
$validator->setCountry('US'); // could be omitted since AD below is a country
$validator->isValid('2015550123');

// input filter with context
$filter = new InputFilter();
$factory = new InputFactory();
// assumption here is that we have a country field coming through the context
$filter->add($factory->createInput(array(
'name' => 'country',
'required' => true,
'validators' => array(
'name' => 'Zend\I18n\Validator\Country', // separate PR coming later
),
)));
$filter->add($factory->createInput(array(
'name' => 'phoneNumber',
'required' => true,
'filters' => array(
'Digits',
),
'validators' => array(
'name' => 'Zend\I18n\Validator\PhoneNumber',
'options' => array(
'country' => 'country',
),
),
)));
```