private function LoadConstantsFromJson()
    {
        $constants_def = Json::Decode(
            file_get_contents($this->definitions_path . "constants.json")
        );

        foreach($constants_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $constants)
            {
                foreach($constants as $constant_name => $constant_data)
                {
                    if(!isset($constant_data["description"]))
                        $constant_data["description"] = "";
                    
                    $constant = new Element\Constant(
                        $constant_name,
                        $constant_data["value"],
                        $constant_data["description"]
                    );

                    $this->symbols->headers[$header]->AddConstant(
                        $constant,
                        $namespace
                    );
                }
            }
        }

        unset($constants_def);
    }
private function LoadConstantsFromJson()
    {
        $constants_def = Json::Decode(
            file_get_contents($this->definitions_path . "constants.json")
        );

        foreach($constants_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $constants)
            {
                foreach($constants as $constant_name => $constant_data)
                {
                    if(!isset($constant_data["description"]))
                        $constant_data["description"] = "";
                    
                    $constant = new Element\Constant(
                        $constant_name,
                        $constant_data["value"],
                        $constant_data["description"]
                    );

                    $this->symbols->headers[$header]->AddConstant(
                        $constant,
                        $namespace
                    );
                }
            }
        }

        unset($constants_def);
    }
private function LoadConstantsFromJson ( ) { $ constants_def = Json :: Decode ( file_get_contents ( $ this -> definitions_path . "constants.json" ) ) ; foreach ( $ constants_def as $ header => $ namespaces ) { $ this -> symbols -> AddHeader ( $ header ) ; foreach ( $ namespaces as $ namespace => $ constants ) { foreach ( $ constants as $ constant_name => $ constant_data ) { if ( ! isset ( $ constant_data [ "description" ] ) ) $ constant_data [ "description" ] = "" ; $ constant = new Element \ Constant ( $ constant_name , $ constant_data [ "value" ] , $ constant_data [ "description" ] ) ; $ this -> symbols -> headers [ $ header ] -> AddConstant ( $ constant , $ namespace ) ; } } } unset ( $ constants_def ) ; }
Load all constant symbols from constants.json
Load all constant symbols from constants . json