public function lookup($code = false) { $countries = ShoppLookup::countries(); if (!isset($countries[$code])) { return false; } $this->code = $code; $this->name = $countries[$code]; // Currency $currencies = (include $this->data('currencies.php')); $currency = Shopp::array_search_deep($code, $currencies); $this->Currency = new ShoppLocaleCurrency($currency, $code); // Region $regions = (include $this->data('regions.php')); $this->region = Shopp::array_search_deep($code, $regions); // Addressing $addrs = (include $this->data('addressing.php')); if (isset($addrs[$code])) { $this->addressing = $addrs[$code]; } else { $this->addressing = SHOPP_DEFAULT_ADDRESSING; } // Units $imperial = array_flip(ShoppLookup::imperial_units()); if (isset($imperial[$code])) { $this->units = 'imperial'; } }