Punic\Territory::getPopulation PHP Метод

getPopulation() публичный статический Метод

Return the population of a specific territory.
public static getPopulation ( string $territoryCode ) : number | null
$territoryCode string The territory code
Результат number | null Return the size of the population of the specified territory (or null if $territoryCode is not valid or no data is available)
    public static function getPopulation($territoryCode)
    {
        $result = null;
        $info = self::getTerritoryInfo($territoryCode);
        if (is_array($info)) {
            $result = $info['population'];
        }
        return $result;
    }