Adds directory of plugin files
public addPluginsDir ( $plugins_dir ) : Smarty | ||
return | Smarty | current Smarty instance for chaining |
// Register the "plugins" directory with Smarty $smarty->addPluginsDir('/path/to/plugins');
// Register multiple directories containing plugins $smarty->addPluginsDir(array( '/path/to/plugins1', '/path/to/plugins2' ));
// Determine the package library for plugins $smarty->addPluginsDir(__DIR__ . '/../vendor/smarty/smarty/libs/plugins/');In this example, we're registering a directory of plugin files that are part of the Smarty package library. By specifying the directory path relative to the current script, we can ensure that our application will work with future versions of Smarty.
public addPluginsDir ( $plugins_dir ) : Smarty | ||
return | Smarty | current Smarty instance for chaining |