public function AddFunction(
        \Peg\Lib\Definitions\Element\FunctionElement $function, 
        $namespace = "\\"
    )
    {
        $this->CreateNamespace($namespace);
        
        $function->header =& $this;
        $function->namespace =& $this->namespaces[$namespace];

        $this->namespaces[$namespace]
            ->functions[$function->name] = $function
        ;
    }
public function AddFunction(
        \Peg\Lib\Definitions\Element\FunctionElement $function, 
        $namespace = "\\"
    )
    {
        $this->CreateNamespace($namespace);
        
        $function->header =& $this;
        $function->namespace =& $this->namespaces[$namespace];

        $this->namespaces[$namespace]
            ->functions[$function->name] = $function
        ;
    }
public function AddFunction ( \ Peg \ Lib \ Definitions \ Element \ FunctionElement $ function , $ namespace = "\\" ) { $ this -> CreateNamespace ( $ namespace ) ; $ function -> header = & $ this ; $ function -> namespace = & $ this -> namespaces [ $ namespace ] ; $ this -> namespaces [ $ namespace ] -> functions [ $ function -> name ] = $ function ; }
Adds a new function.
@param \Peg\Lib\Definitions\Element\FunctionElement $function
@param string $namespace
Adds a new function .