code: public function addFunction($functionName, $callback)
      {
          if (is_string($functionName) && is_callable($callback)) {
              $functions = [
                  'name' => $functionName,
                  'callable' => $callback,
              ];
  
              array_push($this->functionList, $functions);
          }
      }
docs: Adds function to twig engine.
  
  @param string   $functionName Function name to be called from template file
  @param callable $callback     Callback function to be called