IsoCodes\Ssn::initialize PHP Method

initialize() protected static method

Cleans the high group number list so it is useful.
protected static initialize ( )
    protected static function initialize()
    {
        $highgroup = static::$highgroup;
        // Trim the high group list and remove asterisks, fix space/tabs, and replace new lines with tabs.
        // The data isn't formatted well so we have to do quite a bit of random replacing.
        $highgroup = trim((string) $highgroup);
        $highgroup = str_replace(array('*', " \t", "\n", ' '), array('', "\t", "\t", "\t"), $highgroup);
        // Explode on tab. This should give us an array of prefixes and group numbers, IE '203 82', '204 82', etc
        $highgroup = explode("\t", $highgroup);
        // Make array useful by splitting the prefix and group number
        // We also convert the string to an int for easier handling later down the road
        $cleangroup = array();
        foreach ($highgroup as $value) {
            if (trim($value) != '') {
                $temp = explode(' ', $value);
                if (isset($temp[1])) {
                    $cleangroup[(int) trim($temp[0])] = (int) trim($temp[1]);
                    static::$highgroup = (string) $cleangroup;
                }
            }
        }
    }