Returns the "UNI Ship" equivalent product code.

@param string $code

@return string
436122
static function getUniShip($code)
    {
        static::isValid($code);

        switch ($code) {
            case static::EBP :
                return 'CC';
            case static::GBP :
                return 'FF';
            case static::EP :
            case static::SHD :
            case static::FDF :
                return null;
            case static::BP :
            default:
                return 'AA';
        }
    }
978018
public function getReceptionCode($code)
    {
        static $codes = array();

        if (! isset($codes[$code])) {
            $codes[$code] = $this->_loadClass('receptionCode', true, array($code));
        }

        return $codes[$code];
    }
1320990
public static function get(int $code): string {

        if ( array_key_exists($code, self::ZIP_STATUS_CODES) ) return self::ZIP_STATUS_CODES[$code];

        else return sprintf('Unknown status %s', $code);

    }
1102935
protected function getStockItems( $code )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'stock' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'stock.productcode', $code ) );

		return $manager->searchItems( $search );
	}
515359
public function get( $code, $type = null )
	{
		if( isset( $this->prodmap[$code] ) ) {
			return $this->prodmap[$code];
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'product.code', $code ) );

		$result = $manager->searchItems( $search );

		if( ( $item = reset( $result ) ) !== false )
		{
			$this->prodmap[$code] = $item->getId();
			return $this->prodmap[$code];
		}
	}
437403
public static function phoneCode($code): string
    {
        return (isset(static::$phoneCodes[strtoupper($code)])) ? static::$phoneCodes[strtoupper($code)] : 'N/A';
    }
1080536
public static function getMessageFromCode($code)
    {
        if (!array_key_exists($code, self::$responseCodes)) {
            throw new \Exception('The header code '.$code.' is not valid.');
        }

        return self::$responseCodes[$code];
    }
70073
protected function getSafeValue($code)
    {
        if (is_bool($code)) {
            return $code ? '(bool) true' : '(bool) false';
        }

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

        if (is_array($code)) {
            return print_r($code, true);
        }

        return getType($code);
    }
1287303
public function getCountryFromCode($code)
    {
        $code = strtoupper($code);
        $output = "Other";
        if (in_array($code, $this->countriesMapping)) {
            foreach ($this->countriesMapping as $country => $short) {
                if ($code == $short) {
                    $output = $country;
                    break;
                }
            }
        }

        return $output;
    }
1080823
public function repositories(string $code=''){
    $all = $this->options->full_soptions($this->options->from_code('PATHS', 'ide', 'appui'));      
    $cats = [];
    $r = [];
    foreach ( $all as $a ){
      if ( \defined($a['bbn_path']) ){
        $k = $a['bbn_path'] . '/' . ($a['code'] === '/' ? '' : $a['code']);
        if ( !isset($cats[$a['id_alias']]) ){
          unset($a['alias']['cfg']);
          $cats[$a['id_alias']] = $a['alias'];
        }
        unset($a['cfg']);
        unset($a['alias']);
        $r[$k] = $a;
        $r[$k]['title'] = $r[$k]['text'];
        $r[$k]['alias_code'] = $cats[$a['id_alias']]['code'];
        if ( !empty($cats[$a['id_alias']]['tabs']) ){
          $r[$k]['tabs'] = $cats[$a['id_alias']]['tabs'];
        }
        else if( !empty($cats[$a['id_alias']]['extensions']) ){
          $r[$k]['extensions'] = $cats[$a['id_alias']]['extensions'];
        }
        unset($r[$k]['alias']);
      }
    }
    if ( $code ){
      return isset($r[$code]) ? $r[$code] : false;
    }
    return $r;
  }
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';
	}
1312377
public static function fromIso($code)
    {
        $countryCode = strtoupper($code);
        $table = self::isoCodes();

        if (!array_key_exists($countryCode, $table)) {
            return null;
        }

        return $table[$countryCode];
    }
823824
public static function code($code = 200) : String
    {
        $messages = Datatype::multikey(self::$messages);

        if( isset($messages[$code]) )
        {
            return $messages[$code];
        }

        return false;
    }
550290
public function getLanguageByCode($code)
    {
        $returnValue = null;


        $langClass = new core_kernel_classes_Class(static::CLASS_URI_LANGUAGES);
	    $langs = $langClass->searchInstances(array(
            OntologyRdf::RDF_VALUE => $code
	    ), array(
	    	'like' => false
	    ));
	    if (count($langs) == 1) {
	    	$returnValue = current($langs);
	    } else {
	    	common_Logger::w('Could not find language with code '.$code);
	    }


        return $returnValue;
    }
773885
public static function getDescription($code)
    {
        if (isset(self::$codes[$code])) {
            return sprintf('%d (%s)', $code, self::$codes[$code]);
        }
        return $code;
    }
536078
public function find( $code )
	{
		return $this->manager->findItem( $code, $this->domains, 'product', null, true );
	}
660137
public function getAuthorizationCode($code)
    {
        if (isset($this->authorizationCodes[$code])) {
            return $this->authorizationCodes[$code];
        }

        return null;
    }