private function SaveEnumerationsToJson()
    {
        $enumerations = array();
        
        foreach($this->symbols->headers as $header)
        {
            if(!$header->HasEnumerations())
                continue;
            
            foreach($header->namespaces as $namespace)
            {
                if(!$namespace->HasEnumerations())
                    continue;
                
                foreach($namespace->enumerations as $enumeration)
                {
                    if(trim($enumeration->description))
                    {
                        $enumerations[$header->name][$namespace->name]
                            [$enumeration->name] = [
                                "options" => $enumeration->options,
                                "description" => $enumeration->description
                            ]
                        ;
                    }
                    else
                    {
                        $enumerations[$header->name][$namespace->name]
                            [$enumeration->name] = [
                                "options" => $enumeration->options
                            ]
                        ;
                    }
                }
            }
        }
        
        if(count($enumerations) > 0)
        {
            file_put_contents(
                $this->definitions_path . "enumerations.json", 
                Json::Encode($enumerations)
            );

            unset($enumerations);
        }
    }
private function SaveEnumerationsToJson()
    {
        $enumerations = array();
        
        foreach($this->symbols->headers as $header)
        {
            if(!$header->HasEnumerations())
                continue;
            
            foreach($header->namespaces as $namespace)
            {
                if(!$namespace->HasEnumerations())
                    continue;
                
                foreach($namespace->enumerations as $enumeration)
                {
                    if(trim($enumeration->description))
                    {
                        $enumerations[$header->name][$namespace->name]
                            [$enumeration->name] = [
                                "options" => $enumeration->options,
                                "description" => $enumeration->description
                            ]
                        ;
                    }
                    else
                    {
                        $enumerations[$header->name][$namespace->name]
                            [$enumeration->name] = [
                                "options" => $enumeration->options
                            ]
                        ;
                    }
                }
            }
        }
        
        if(count($enumerations) > 0)
        {
            file_put_contents(
                $this->definitions_path . "enumerations.json", 
                Json::Encode($enumerations)
            );

            unset($enumerations);
        }
    }
private function SaveEnumerationsToJson ( ) { $ enumerations = array ( ) ; foreach ( $ this -> symbols -> headers as $ header ) { if ( ! $ header -> HasEnumerations ( ) ) continue ; foreach ( $ header -> namespaces as $ namespace ) { if ( ! $ namespace -> HasEnumerations ( ) ) continue ; foreach ( $ namespace -> enumerations as $ enumeration ) { if ( trim ( $ enumeration -> description ) ) { $ enumerations [ $ header -> name ] [ $ namespace -> name ] [ $ enumeration -> name ] = [ "options" => $ enumeration -> options , "description" => $ enumeration -> description ] ; } else { $ enumerations [ $ header -> name ] [ $ namespace -> name ] [ $ enumeration -> name ] = [ "options" => $ enumeration -> options ] ; } } } } if ( count ( $ enumerations ) > 0 ) { file_put_contents ( $ this -> definitions_path . "enumerations.json" , Json :: Encode ( $ enumerations ) ) ; unset ( $ enumerations ) ; } }
Save enumeration symbols into enumerations.json.
Save enumeration symbols into enumerations . json .