public function getCountryCodeByName($name)
    {
        if (isset($this->countryList[$name])) {
            return $this->countryList[$name];
        }

        //nothing found we try case insensitive
        $name = strtolower($name);
        foreach ($this->countryList as $countryName => $countryCode) {
            if (strtolower($countryName) == $name) {
                return $countryCode;
            }
        }

        return null;
    }