PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Name

addPluginsDir() — add a directory to the list of directories where plugins are stored

Description

Smarty addPluginsDir(string|array plugins_dir);

Example 164. addPluginsDir()



<?php

// add directory where plugins are stored
$smarty->addPluginsDir('./plugins_1');

// add multiple directories where plugins are stored
$smarty->setPluginsDir(array(
    
'./plugins_2',
    
'./plugins_3',
));

// view the plugins dir chain
var_dump($smarty->getPluginsDir());

// chaining of method calls
$smarty->setPluginsDir('./plugins')
       ->
addPluginsDir('./plugins_1')
       ->
addPluginsDir('./plugins_2');

?>

   

See also getPluginsDir(), setPluginsDir() and $plugins_dir.

Smarty Template Engine