protected function loadDefinitions(array $parents)
    {
        $group = $this->buildGroup($parents);
        if (isset($this->definitions[$group])) {
            return $this->definitions[$group];
        }

        // If there are predefined subdivisions at this level, try to load them.
        $this->definitions[$group] = [];
        if ($this->hasData($parents)) {
            $filename = $this->definitionPath . $group . '.json';
            if ($rawDefinition = @file_get_contents($filename)) {
                $this->definitions[$group] = json_decode($rawDefinition, true);
                $this->definitions[$group] = $this->processDefinitions($this->definitions[$group]);
            }
        }

        return $this->definitions[$group];
    }
protected function loadDefinitions(array $parents)
    {
        $group = $this->buildGroup($parents);
        if (isset($this->definitions[$group])) {
            return $this->definitions[$group];
        }

        // If there are predefined subdivisions at this level, try to load them.
        $this->definitions[$group] = [];
        if ($this->hasData($parents)) {
            $filename = $this->definitionPath . $group . '.json';
            if ($rawDefinition = @file_get_contents($filename)) {
                $this->definitions[$group] = json_decode($rawDefinition, true);
                $this->definitions[$group] = $this->processDefinitions($this->definitions[$group]);
            }
        }

        return $this->definitions[$group];
    }
protected function loadDefinitions ( array $ parents ) { $ group = $ this -> buildGroup ( $ parents ) ; if ( isset ( $ this -> definitions [ $ group ] ) ) { return $ this -> definitions [ $ group ] ; } // If there are predefined subdivisions at this level, try to load them. $ this -> definitions [ $ group ] = [ ] ; if ( $ this -> hasData ( $ parents ) ) { $ filename = $ this -> definitionPath . $ group . '.json' ; if ( $ rawDefinition = @ file_get_contents ( $ filename ) ) { $ this -> definitions [ $ group ] = json_decode ( $ rawDefinition , true ) ; $ this -> definitions [ $ group ] = $ this -> processDefinitions ( $ this -> definitions [ $ group ] ) ; } } return $ this -> definitions [ $ group ] ; }
Loads the subdivision definitions for the provided parents.

@param array $parents The parents (country code, subdivision codes).

@return array The subdivision definitions.
Loads the subdivision definitions for the provided parents .