Microweber\Providers\ShopManager::currency_get PHP Method

currency_get() public method

public currency_get ( )
    public function currency_get()
    {
        static $currencies_list = false;
        if ($currencies_list) {
            return $currencies_list;
        }
        $row = 1;
        $cur_file = MW_PATH . 'Utils' . DS . 'lib' . DS . 'currencies.csv';
        if (is_file($cur_file)) {
            if (($handle = fopen($cur_file, 'r')) !== false) {
                $res = array();
                while (($data = fgetcsv($handle, 1000, ',')) !== false) {
                    $itm = array();
                    $num = count($data);
                    ++$row;
                    for ($c = 0; $c < $num; ++$c) {
                        $itm[] = $data[$c];
                    }
                    $res[] = $itm;
                }
                fclose($handle);
                $currencies_list = $res;
                return $res;
            }
        }
    }