private function SaveGlobalVariablesToJson()
    {
        $variables = array();
        
        foreach($this->symbols->headers as $header)
        {
            if(!$header->HasGlobalVariables())
                continue;
            
            foreach($header->namespaces as $namespace)
            {
                if(!$namespace->HasGlobalVariables())
                    continue;
                
                foreach($namespace->global_variables as $variable)
                {
                    if(trim($variable->description))
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type,
                                "description" => $variable->description
                            ]
                        ;
                    }
                    else
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type
                            ]
                        ;
                    }
                }
            }
        }
        
        if(count($variables) > 0)
        {
            file_put_contents(
                $this->definitions_path . "variables.json", 
                Json::Encode($variables)
            );

            unset($variables);
        }
    }
private function SaveGlobalVariablesToJson()
    {
        $variables = array();
        
        foreach($this->symbols->headers as $header)
        {
            if(!$header->HasGlobalVariables())
                continue;
            
            foreach($header->namespaces as $namespace)
            {
                if(!$namespace->HasGlobalVariables())
                    continue;
                
                foreach($namespace->global_variables as $variable)
                {
                    if(trim($variable->description))
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type,
                                "description" => $variable->description
                            ]
                        ;
                    }
                    else
                    {
                        $variables[$header->name][$namespace->name]
                            [$variable->name] = [
                                "type" => $variable->original_type
                            ]
                        ;
                    }
                }
            }
        }
        
        if(count($variables) > 0)
        {
            file_put_contents(
                $this->definitions_path . "variables.json", 
                Json::Encode($variables)
            );

            unset($variables);
        }
    }
private function SaveGlobalVariablesToJson ( ) { $ variables = array ( ) ; foreach ( $ this -> symbols -> headers as $ header ) { if ( ! $ header -> HasGlobalVariables ( ) ) continue ; foreach ( $ header -> namespaces as $ namespace ) { if ( ! $ namespace -> HasGlobalVariables ( ) ) continue ; foreach ( $ namespace -> global_variables as $ variable ) { if ( trim ( $ variable -> description ) ) { $ variables [ $ header -> name ] [ $ namespace -> name ] [ $ variable -> name ] = [ "type" => $ variable -> original_type , "description" => $ variable -> description ] ; } else { $ variables [ $ header -> name ] [ $ namespace -> name ] [ $ variable -> name ] = [ "type" => $ variable -> original_type ] ; } } } } if ( count ( $ variables ) > 0 ) { file_put_contents ( $ this -> definitions_path . "variables.json" , Json :: Encode ( $ variables ) ) ; unset ( $ variables ) ; } }
Save global variable symbols into variables.json.
Save global variable symbols into variables . json .