private function LoadFunctionsFromJson()
    {
        $functions_def = Json::Decode(
            file_get_contents(
                $this->definitions_path . "functions.json"
            )
        );

        foreach($functions_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $functions)
            {
                foreach($functions as $function_name => $function_overloads)
                {
                    $function = new Element\FunctionElement($function_name);
                    
                    foreach($function_overloads as $index=>$function_overload)
                    {
                        $overload = new Element\Overload(
                            $function_overload["description"]
                        );
                        
                        $overload->SetReturnType(
                            new Element\ReturnType(
                                $function_overload["return_type"]
                            )
                        );
                        
                        if(isset($function_overload["parameters"]))
                        {
                            foreach($function_overload["parameters"] as $parameter)
                            {
                                if(!isset($parameter["value"]))
                                    $parameter["value"] = "";
                                
                                if(!isset($parameter["description"]))
                                    $parameter["description"] = "";

                                $param = new Element\Parameter(
                                    $parameter["name"], 
                                    $parameter["type"], 
                                    $parameter["value"],
                                    $parameter["description"]
                                );
                                
                                if(!isset($parameter["is_array"]))
                                    $param->is_array = false;
                                else
                                    $param->is_array = $parameter["is_array"];
                                
                                $overload->AddParameter($param);
                            }
                        }
                        
                        $function->AddOverload($overload);
                    }
                    
                    $this->symbols->headers[$header]->AddFunction(
                        $function,
                        $namespace
                    );
                }
            }
        }

        unset($functions_def);
    }
private function LoadFunctionsFromJson()
    {
        $functions_def = Json::Decode(
            file_get_contents(
                $this->definitions_path . "functions.json"
            )
        );

        foreach($functions_def as $header => $namespaces)
        {
            $this->symbols->AddHeader($header);
            
            foreach($namespaces as $namespace => $functions)
            {
                foreach($functions as $function_name => $function_overloads)
                {
                    $function = new Element\FunctionElement($function_name);
                    
                    foreach($function_overloads as $index=>$function_overload)
                    {
                        $overload = new Element\Overload(
                            $function_overload["description"]
                        );
                        
                        $overload->SetReturnType(
                            new Element\ReturnType(
                                $function_overload["return_type"]
                            )
                        );
                        
                        if(isset($function_overload["parameters"]))
                        {
                            foreach($function_overload["parameters"] as $parameter)
                            {
                                if(!isset($parameter["value"]))
                                    $parameter["value"] = "";
                                
                                if(!isset($parameter["description"]))
                                    $parameter["description"] = "";

                                $param = new Element\Parameter(
                                    $parameter["name"], 
                                    $parameter["type"], 
                                    $parameter["value"],
                                    $parameter["description"]
                                );
                                
                                if(!isset($parameter["is_array"]))
                                    $param->is_array = false;
                                else
                                    $param->is_array = $parameter["is_array"];
                                
                                $overload->AddParameter($param);
                            }
                        }
                        
                        $function->AddOverload($overload);
                    }
                    
                    $this->symbols->headers[$header]->AddFunction(
                        $function,
                        $namespace
                    );
                }
            }
        }

        unset($functions_def);
    }
private function LoadFunctionsFromJson ( ) { $ functions_def = Json :: Decode ( file_get_contents ( $ this -> definitions_path . "functions.json" ) ) ; foreach ( $ functions_def as $ header => $ namespaces ) { $ this -> symbols -> AddHeader ( $ header ) ; foreach ( $ namespaces as $ namespace => $ functions ) { foreach ( $ functions as $ function_name => $ function_overloads ) { $ function = new Element \ FunctionElement ( $ function_name ) ; foreach ( $ function_overloads as $ index => $ function_overload ) { $ overload = new Element \ Overload ( $ function_overload [ "description" ] ) ; $ overload -> SetReturnType ( new Element \ ReturnType ( $ function_overload [ "return_type" ] ) ) ; if ( isset ( $ function_overload [ "parameters" ] ) ) { foreach ( $ function_overload [ "parameters" ] as $ parameter ) { if ( ! isset ( $ parameter [ "value" ] ) ) $ parameter [ "value" ] = "" ; if ( ! isset ( $ parameter [ "description" ] ) ) $ parameter [ "description" ] = "" ; $ param = new Element \ Parameter ( $ parameter [ "name" ] , $ parameter [ "type" ] , $ parameter [ "value" ] , $ parameter [ "description" ] ) ; if ( ! isset ( $ parameter [ "is_array" ] ) ) $ param -> is_array = false ; else $ param -> is_array = $ parameter [ "is_array" ] ; $ overload -> AddParameter ( $ param ) ; } } $ function -> AddOverload ( $ overload ) ; } $ this -> symbols -> headers [ $ header ] -> AddFunction ( $ function , $ namespace ) ; } } } unset ( $ functions_def ) ; }
Load all function symbols from functions.json
Load all function symbols from functions . json