Returns the tao language code that corresponds to the code provided
not yet implemented, will always use default

@param string $code

@return string
@throws common_exception_Error
969436
public static function mapCode2InterfaceLanguage($code)
    {
        if (!empty($code)) {
            $languageService = tao_models_classes_LanguageService::singleton();
            $usage = new core_kernel_classes_Resource(tao_models_classes_LanguageService::INSTANCE_LANGUAGE_USAGE_GUI);
            if ($languageService->isLanguageAvailable($code, $usage)) {
                return $code;
            }
            \common_Logger::d('[Fallback] The provided launch language is unavailable: ' . $code);
        }

        return DEFAULT_LANG;
    }
1316187
public function getException($code)
    {
        if (!isset($this->exceptions[$code])) {
            throw new Exceptions\ExceptionNotDefinedException($this, $code);
        }

        return $this->exceptions[$code];
    }
1292702
public static function getPhrase(int $code):string
    {
        if (isset(self::$response[$code])) {
            return (self::$response[$code]);
        } else {
            throw new Server500(new \ArrayObject(array("explain" => "Http code does not exist",
                "solution" => "Please check your http code")));
        }
    }
1316611
public function get_code_image($code=''){
		if ($code=='') $code = $this->_logincode;
		if (!$code) return false;
		return 'http://login.weixin.qq.com/qrcode/'.$this->_logincode.'?t=webwx';
	}
159262
function language($code) {
		$code=preg_replace('/\h+|;q=[0-9.]+/','',$code);
		$code.=($code?',':'').$this->fallback;
		$this->languages=[];
		foreach (array_reverse(explode(',',$code)) as $lang)
			if (preg_match('/^(\w{2})(?:-(\w{2}))?\b/i',$lang,$parts)) {
				// Generic language
				array_unshift($this->languages,$parts[1]);
				if (isset($parts[2])) {
					// Specific language
					$parts[0]=$parts[1].'-'.($parts[2]=strtoupper($parts[2]));
					array_unshift($this->languages,$parts[0]);
				}
			}
		$this->languages=array_unique($this->languages);
		$locales=[];
		$windows=preg_match('/^win/i',PHP_OS);
		// Work around PHP's Turkish locale bug
		foreach (preg_grep('/^(?!tr)/i',$this->languages) as $locale) {
			if ($windows) {
				$parts=explode('-',$locale);
				$locale=@constant('ISO::LC_'.$parts[0]);
				if (isset($parts[1]) &&
					$country=@constant('ISO::CC_'.strtolower($parts[1])))
					$locale.='-'.$country;
			}
			$locale=str_replace('-','_',$locale);
			$locales[]=$locale.'.'.ini_get('default_charset');
			$locales[]=$locale;
		}
		setlocale(LC_ALL,$locales);
		return $this->hive['LANGUAGE']=implode(',',$this->languages);
	}
395940
protected function assertValidCode($code)
    {
        if ($code instanceof Money) {
            $code = $code->getCurrency();
        }

        if ($code instanceof Currency) {
            return (string) $code;
        }

        if (!is_string($code)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Currency code should be a string; %s given',
                gettype($code)
            ));
        }

        $code = trim(strtoupper($code));
        if (!Currencies::exists($code)) {
            throw new Exception\UnknownCurrencyException(sprintf(
                '%s is not a valid ISO 4217 Currency code',
                $code
            ));
        }

        return $code;
    }
369979
public function getType($code)
    {
        if (!$this->hasType($code)) {
            throw new MissingAttributeTypeException($code);
        }

        return $this->types[$code];
    }
731862
private function getHumanResultCode($code)
    {
        if (isset($this->resultCodes[$code])) {
            return $this->resultCodes[$code];
        }

        if (is_scalar($code)) {
            return $code;
        }

        return self::UNKNOWN_CODE;
    }
302410
protected function getDefaultMessage($code, $message): string
    {
        if ($code !== null && $message === null) {
            return ApiResponse::$statusTexts[$code]['message'];
        }

        return $message;
    }
1111221
public function getMessage(int $code): string
    {
        return $this->statusExists($code) ? $this->statuses[$code] : self::UNDEFINED_STATUS_MESSAGE;
    }
287466
public static function getDescription($code)
    {
        if (array_key_exists($code, self::$codes_to_string_map)) {
            return self::$codes_to_string_map[$code];
        } else {
            return false;
        }
    }
571752
public function get($code)
    {
        $result = &gplcart_static("country.get.$code");

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('country.get.before', $code, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $sql = 'SELECT * FROM country WHERE code=?';
        $result = $this->db->fetch($sql, array($code), array('unserialize' => 'format'));

        if (isset($result['format'])) {
            $default_format = $this->getDefaultFormat();
            $result['format'] = gplcart_array_merge($default_format, $result['format']);
            gplcart_array_sort($result['format']);
        }

        $this->hook->attach('country.get.after', $code, $result, $this);
        return $result;
    }
407284
protected function getCode($code)
    {
        if (is_array($code)) {
            return $this->getCodeArray($code);
        }

        return $this->get($code);
    }
689753
public function getErrorType($code)
    {
        switch ($code) {
            case E_ERROR:
                return self::$stack['type'] = 'Error'; // 1
            case E_WARNING:
                return self::$stack['type'] = 'Warning'; // 2
            case E_PARSE:
                return self::$stack['type'] = 'Parse'; // 4
            case E_NOTICE:
                return self::$stack['type'] = 'Notice'; // 8
            case E_CORE_ERROR:
                return self::$stack['type'] = 'Core-Error'; // 16
            case E_CORE_WARNING:
                return self::$stack['type'] = 'Core Warning'; // 32
            case E_COMPILE_ERROR:
                return self::$stack['type'] = 'Compile Error'; // 64
            case E_COMPILE_WARNING:
                return self::$stack['type'] = 'Compile Warning'; // 128
            case E_USER_ERROR:
                return self::$stack['type'] = 'User Error'; // 256
            case E_USER_WARNING:
                return self::$stack['type'] = 'User Warning'; // 512
            case E_USER_NOTICE:
                return self::$stack['type'] = 'User Notice'; // 1024
            case E_STRICT:
                return self::$stack['type'] = 'Strict'; // 2048
            case E_RECOVERABLE_ERROR:
                return self::$stack['type'] = 'Recoverable Error'; // 4096
            case E_DEPRECATED:
                return self::$stack['type'] = 'Deprecated'; // 8192
            case E_USER_DEPRECATED:
                return self::$stack['type'] = 'User Deprecated'; // 16384
            default:
                return self::$stack['type'] = 'Error';
        }
    }
155489
public function getCode($code)
    {
        $result = $this->wechat->httpPost(self::WECHAT_DELETE_CARD_URL, [
            'code' => $code
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result : false;
    }
556703
public static function getReason($code, $default = NULL)
	{
		$code = (int)$code;
		
		if(array_key_exists($code, static::$reason))
		{
			return static::$reason[$code];
		}
		
		return $default;
	}
635310
public function show($code)
    {
        $lang = $this->langRepo->getByCode($code);
        if (empty($lang)) {
            return $this->respondNotFound();
        }
        return $this->respondWithSuccess($lang, new LangTransformer);
    }