use Friendica\Render\ITemplateEngine;
/**
- * @brief This class handles Renderer related functions.
+ * This class handles Renderer related functions.
*/
class Renderer
{
/**
- * @brief An array of registered template engines ('name'=>'class name')
+ * An array of registered template engines ('name'=>'class name')
*/
public static $template_engines = [];
/**
- * @brief An array of instanced template engines ('name'=>'instance')
+ * An array of instanced template engines ('name'=>'instance')
*/
public static $template_engine_instance = [];
/**
- * @brief An array for all theme-controllable parameters
+ * An array for all theme-controllable parameters
*
* Mostly unimplemented yet. Only options 'template_engine' and
* beyond are used.
];
/**
- * @brief This is our template processor
+ * This is our template processor
*
* @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
* @param array $vars Key value pairs (search => replace)
public static function replaceMacros($s, array $vars = [])
{
$stamp1 = microtime(true);
- $a = DI::app();
// pass $baseurl to all templates if it isn't set
- $vars = array_merge(['$baseurl' => $a->getBaseURL()], $vars);
+ $vars = array_merge(['$baseurl' => DI::baseUrl()->get()], $vars);
$t = self::getTemplateEngine();
}
/**
- * @brief Load a given template $s
+ * Load a given template $s
*
* @param string $s Template to load.
* @param string $root Optional.
}
/**
- * @brief Register template engine class
+ * Register template engine class
*
* @param string $class
*/
}
/**
- * @brief Return template engine instance.
+ * Return template engine instance.
*
* If $name is not defined, return engine defined by theme,
* or default
}
/**
- * @brief Returns the active template engine.
+ * Returns the active template engine.
*
* @return string the active template engine
*/