public function getCountry()
    {
        $countryCode = $this->getAsString('static_info_country');
        if ($countryCode === '') {
            return null;
        }

        try {
            /** @var \Tx_Oelib_Mapper_Country $countryMapper */
            $countryMapper = \Tx_Oelib_MapperRegistry::get(\Tx_Oelib_Mapper_Country::class);
            /** @var \Tx_Oelib_Model_Country $country */
            $country = $countryMapper->findByIsoAlpha3Code($countryCode);
        } catch (\Tx_Oelib_Exception_NotFound $exception) {
            $country = null;
        }

        return $country;
    }
public function getCountry()
    {
        $countryCode = $this->getAsString('static_info_country');
        if ($countryCode === '') {
            return null;
        }

        try {
            /** @var \Tx_Oelib_Mapper_Country $countryMapper */
            $countryMapper = \Tx_Oelib_MapperRegistry::get(\Tx_Oelib_Mapper_Country::class);
            /** @var \Tx_Oelib_Model_Country $country */
            $country = $countryMapper->findByIsoAlpha3Code($countryCode);
        } catch (\Tx_Oelib_Exception_NotFound $exception) {
            $country = null;
        }

        return $country;
    }
public function getCountry ( ) { $ countryCode = $ this -> getAsString ( 'static_info_country' ) ; if ( $ countryCode === '' ) { return null ; } try { /** @var \Tx_Oelib_Mapper_Country $countryMapper */ $ countryMapper = \ Tx_Oelib_MapperRegistry :: get ( \ Tx_Oelib_Mapper_Country :: class ) ; /** @var \Tx_Oelib_Model_Country $country */ $ country = $ countryMapper -> findByIsoAlpha3Code ( $ countryCode ) ; } catch ( \ Tx_Oelib_Exception_NotFound $ exception ) { $ country = null ; } return $ country ; }
Returns the country of this user as \Tx_Oelib_Model_Country.

Note: This function uses the "country code" field, not the free-text country field.

@return \Tx_Oelib_Model_Country the country of this user, will be NULL if no valid country has been set
Returns the country of this user as \ Tx_Oelib_Model_Country .