public function getCode($set = true)
    {
        $list = $this->getList();
        $code = $this->getFromUrl();

        if (empty($code)) {
            $code = $this->getFromCookie();
        }

        if (empty($list[$code]['status'])) {
            $code = $this->getDefault();
        }

        if ($set) {
            $this->setCookie($code);
        }

        return $code;
    }
public function getCode($set = true)
    {
        $list = $this->getList();
        $code = $this->getFromUrl();

        if (empty($code)) {
            $code = $this->getFromCookie();
        }

        if (empty($list[$code]['status'])) {
            $code = $this->getDefault();
        }

        if ($set) {
            $this->setCookie($code);
        }

        return $code;
    }
public function getCode ( $ set = true ) { $ list = $ this -> getList ( ) ; $ code = $ this -> getFromUrl ( ) ; if ( empty ( $ code ) ) { $ code = $ this -> getFromCookie ( ) ; } if ( empty ( $ list [ $ code ] [ 'status' ] ) ) { $ code = $ this -> getDefault ( ) ; } if ( $ set ) { $ this -> setCookie ( $ code ) ; } return $ code ; }
Returns the current currency code
@param bool $set
@return string
Returns the current currency code