private function LoadGlobalVariablesFromJson()
    {
        $variables_def = Json::Decode(file_get_contents(
            $this->definitions_path . "variables.json")
        );

        foreach($variables_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $variables)
            {
                foreach($variables as $variable_name => $variable_data)
                {
                    if(!isset($variable_data["description"]))
                        $variable_data["description"] = "";
                    
                    $variable = new Element\GlobalVariable(
                        $variable_name,
                        $variable_data["type"],
                        $variable_data["description"]
                    );

                    $this->symbols->headers[$header]->AddGlobalVariable(
                        $variable,
                        $namespace
                    );
                }
            }
        }

        unset($variables_def);
    }
private function LoadGlobalVariablesFromJson()
    {
        $variables_def = Json::Decode(file_get_contents(
            $this->definitions_path . "variables.json")
        );

        foreach($variables_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $variables)
            {
                foreach($variables as $variable_name => $variable_data)
                {
                    if(!isset($variable_data["description"]))
                        $variable_data["description"] = "";
                    
                    $variable = new Element\GlobalVariable(
                        $variable_name,
                        $variable_data["type"],
                        $variable_data["description"]
                    );

                    $this->symbols->headers[$header]->AddGlobalVariable(
                        $variable,
                        $namespace
                    );
                }
            }
        }

        unset($variables_def);
    }
private function LoadGlobalVariablesFromJson ( ) { $ variables_def = Json :: Decode ( file_get_contents ( $ this -> definitions_path . "variables.json" ) ) ; foreach ( $ variables_def as $ header => $ namespaces ) { $ this -> symbols -> AddHeader ( $ header ) ; foreach ( $ namespaces as $ namespace => $ variables ) { foreach ( $ variables as $ variable_name => $ variable_data ) { if ( ! isset ( $ variable_data [ "description" ] ) ) $ variable_data [ "description" ] = "" ; $ variable = new Element \ GlobalVariable ( $ variable_name , $ variable_data [ "type" ] , $ variable_data [ "description" ] ) ; $ this -> symbols -> headers [ $ header ] -> AddGlobalVariable ( $ variable , $ namespace ) ; } } } unset ( $ variables_def ) ; }
Load all global variable symbols from variables.json
Load all global variable symbols from variables . json