Jelix\Core\AppInstance::declarePluginsDir PHP Method

declarePluginsDir() public method

Declare a directory containing some plugins. Note that it does not need to declare 'plugins/' inside modules, as there are declared automatically when you declare modules.
public declarePluginsDir ( string | string[] $basePath )
$basePath string | string[] the directory path containing plugins that can be used
    public function declarePluginsDir($basePath)
    {
        $this->_allPluginsPath = null;
        if (!is_array($basePath)) {
            $basePath = array($basePath);
        }
        foreach ($basePath as $path) {
            $p = realpath($path);
            if ($p == '') {
                throw new \Exception('Given plugin dir ' . $path . 'does not exists');
            }
            $this->_pluginsDirPath[] = $p;
        }
    }