public function addFunction($functionName, $callback)
    {
        if (is_string($functionName) && is_callable($callback)) {
            $functions = [
                'name' => $functionName,
                'callable' => $callback,
            ];

            array_push($this->functionList, $functions);
        }
    }
public function addFunction($functionName, $callback)
    {
        if (is_string($functionName) && is_callable($callback)) {
            $functions = [
                'name' => $functionName,
                'callable' => $callback,
            ];

            array_push($this->functionList, $functions);
        }
    }
public function addFunction ( $ functionName , $ callback ) { if ( is_string ( $ functionName ) && is_callable ( $ callback ) ) { $ functions = [ 'name' => $ functionName , 'callable' => $ callback , ] ; array_push ( $ this -> functionList , $ functions ) ; } }
Adds function to twig engine.

@param string   $functionName Function name to be called from template file
@param callable $callback     Callback function to be called
Adds function to twig engine .