Return all countries as a numerically-keyed array.

@return array
490154
public static function all()
    {
        $countries = array_values(static::$countries);

        array_walk($countries, function (&$value) {
            $value = new Country($value);
        });

        return $countries;
    }
1166951
public function getAllLocalForeignKeys()
    {
        $columns = array();
        foreach ($this->getColumns() as $column) {
            foreach ($column->getLocalForeignKeys() as $foreignKey) {
                if (array_key_exists($foreignKey->getId(), $columns)) {
                    continue;
                }
                $columns[$foreignKey->getId()] = $foreignKey;
            }
        }

        return $columns;
    }
672834
public function getAllFlat()
    {
        $aOut       = array();
        $aCountries = $this->getAll();

        foreach ($aCountries as $oCountry) {
            $aOut[$oCountry->code] = $oCountry->label;
        }

        return $aOut;
    }
195595
public function countries(array $countryCodes = null): array
    {
        if (!Configure::read('countries')) {
            Configure::load('CkTools.countries');
        }
        if ($countryCodes) {
            $countries = Configure::read('countries');
            $subset = [];
            foreach ($countryCodes as $countryCode) {
                $subset[$countryCode] = $countries[$countryCode] ?? $countryCode;
            }

            return $subset;
        }

        return Configure::read('countries');
    }
544822
public function toArray()
	{
		return array(
			'address'		=> $this->types['adr'],
			'email'			=> $this->types['email'],
			'formatedName'	=> $this->types['fn'],
			'geo'			=> $this->types['geo'],
			'name'			=> $this->types['n'],
			'nickname'		=> $this->types['nickname'],
			'organisation'	=> $this->types['org'],
			'role'			=> $this->types['role'],
			'telephone'		=> $this->types['tel'],
			'title'			=> $this->types['title'],
			'url'			=> $this->types['url'],
		);
	}
1291511
protected function getGeoCodeData()
    {
        $result = [];
        foreach ($this->userLocations as $data) {
            $result[] = [
                'country' => ArrayHelper::getValue($data['location'], 'country'),
                'address' => implode(',', ArrayHelper::getValue($data, 'location')),
                'htmlContent' => ArrayHelper::getValue($data, 'htmlContent'),
            ];
        }

        return $result;
    }
217187
public function toArray()
    {
        $helper = Mage::helper('australia');
        return array(
            self::AUTHORITY_LEAVE => $helper->__('Authority To Leave'),
            self::AUTHORITY_LEAVE_REQUEST => $helper->__('Authority To leave can be requested'),
            self::REQUIRED => $helper->__('Signature required'),
        );
    }
1205674
public function toArray()
    {
        return array(
            'age' => $this->getAge(),
            'quarter' => $this->getQuarter(),
            'day' => $this->getDay(),
            'month' => $this->getMonth(),
            'year' => $this->getYear(),
            'hour' => $this->getHour(),
            'minute' => $this->getMinute(),
            'second' => $this->getSecond(),
            'microsecond' => $this->getMicrosecond(),
            'timezone' => $this->getTimezone(),
            'timestamp' => $this->getTimestamp(),
            'milliTimestamp' => $this->getMilliTimestamp(),
            'dayOfWeek' => $this->getDayOfWeek(),
            'dayOfYear' => $this->getDayOfYear(),
            'week' => $this->getWeek(),
        );
    }
948716
public function toArray()
    {
        $list = [];

        // Add popular timezones to list
        foreach ($this->popularTimezones as $key => $value) {
            $list['General'][$key] = $value;
        }

        // Add all timezone of continents to list
        foreach ($this->continents as $continent => $mask) {
            $timezones = DateTimeZone::listIdentifiers($mask);
            foreach ($timezones as $timezone) {
                $list[$continent][$timezone] = $this->formatTimezone($timezone, $continent);
            }
        }

        return $list;
    }
160821
public function getCountries()
    {
        if (!isset($this->_issuerData))
            throw new Exception("Issuer must be selected first");
        $countries = array();
        foreach ($this->_issuerData["Countries"] as $country) {
            array_push($countries, $country["CountryCode"]);
        }
        return $countries;
    }
955428
public function getAllLocalizations()
    {
        $localizations = [];
        foreach ($this->getLocalizations() as $child) {
            $localizations[] = $child;
            $localizations = array_merge($localizations, $child->getAllLocalizations());
        }

        return $localizations;
    }
993619
public function getRelatedCountries()
    {
        $conn = $this->app->getApplicationBox()->get_connection();

        $sql = 'SELECT DISTINCT Users.country ' . $this->generate_sql_constraints() . ' ORDER BY Users.country';

        $stmt = $conn->prepare($sql);
        $stmt->execute($this->sql_params);
        $rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $countries = [];
        $listCountry = Countries::getCountries($this->app['locale']);
        foreach ($rs as $row) {
            if (trim($row['country']) === '') {
                continue;
            }

            if (isset($listCountry[$row['country']])) {
                $countries[$row['country']] = $listCountry[$row['country']];
            }
        }

        return $countries;
    }
1165862
public static function countriesLocaleCodes()
    {
        static $list;

        if ($list === null) {
            $list = [];
            foreach (static::codes() as $localeCode) {
                if ($countryCode = \Locale::getRegion($localeCode)) {
                    $list[$countryCode][] = $localeCode;
                }
            }
        }

        return $list;
    }
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
1297238
public function keySet()
    {
        $result = [];
        $keys = $this->keys();
        foreach ($keys as $key) {
            $result[] = $key;
        }

        return $result;
    }
390717
public function toOptionArray()
    {
        if (count($this->options) == 0) {
            $this->options = $this->countryCollectionFactory->create()->toOptionArray(' ');
        }
        return $this->options;
    }
78271
public function toArray()
    {
        return [$this->currency => [
            'name'                => $this->name,
            'code'                => $this->code,
            'precision'           => $this->precision,
            'subunit'             => $this->subunit,
            'symbol'              => $this->symbol,
            'symbol_first'        => $this->symbolFirst,
            'decimal_mark'        => $this->decimalMark,
            'thousands_separator' => $this->thousandsSeparator,
            'prefix'              => $this->getPrefix(),
            'suffix'              => $this->getSuffix(),
        ]];
    }