Unloading all plugins with App::build() and $reset parameter is true

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-06 01:05:33 -04:30
parent 27a134de4f
commit f18b9aae7b
3 changed files with 21 additions and 18 deletions

View file

@ -226,6 +226,8 @@ class App {
*
* `App::build(array('View/Helper' => array('/path/to/models/', '/another/path/))); will setup multiple search paths for helpers`
*
* If reset is set to true, all loaded plugins will be forgotten and they will be needed to be loaded again.
*
* @param array $paths associative array with package names as keys and a list of directories for new search paths
* @param boolean $reset true will set paths, false merges paths [default] false
* @return void
@ -303,6 +305,7 @@ class App {
}
self::$__packages[$type] = (array)$new;
}
CakePlugin::unload();
return $paths;
}