original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Loads a country from the database
  @param string $code
  @return array
docstring_tokens: Loads a country from the database