Punic APIs
  • Namespace
  • Class
  • Tree
  • Todo

Namespaces

  • Punic
    • Exception

Classes

  • Calendar
  • Comparer
  • Currency
  • Data
  • Language
  • Misc
  • Number
  • Phone
  • Plural
  • Territory
  • Unit

Exceptions

  • Exception

Class Phone

Numbers helpers.

Namespace: Punic
Located at Phone.php

Methods summary

public static array
# getPrefixesForTerritory( string $territoryCode )

Retrieve the list of the country calling codes for a specific country.

Retrieve the list of the country calling codes for a specific country.

Parameters

$territoryCode
The country identifier ('001' for global systems, for instance satellite communications like Iridium)

Returns

array
Returns the list of country calling codes found for the specified country (eg: for 'US' you'll get array('1'))
public static array
# getTerritoriesForPrefix( string $prefix )

Retrieve the list of territory codes for a specific prefix.

Retrieve the list of territory codes for a specific prefix.

Parameters

$prefix
The country calling code (for instance: '1')

Returns

array
Returns the list of territories for which the specified prefix is applicable (eg: for '1' you'll get array('US', 'AG', 'AI', 'CA', ...))
public static integer
# getMaxPrefixLength( )

Retrieve the max length of the country calling codes.

Retrieve the max length of the country calling codes.

Returns

integer
Punic APIs API documentation generated by ApiGen