diff --git a/lib/Cake/Core/CakePlugin.php b/lib/Cake/Core/CakePlugin.php index 96ce894fd..5f30887f4 100644 --- a/lib/Cake/Core/CakePlugin.php +++ b/lib/Cake/Core/CakePlugin.php @@ -48,8 +48,13 @@ class CakePlugin { * * It is also possible to load multiple plugins at once. Examples: * - * `CakePlugin::load(array('DebugKit', 'ApiGenerator'))` will load the DebugKit and ApiGenerator plugins - * `CakePlugin::load(array('DebugKit', 'ApiGenerator'), array('bootstrap' => true))` will load bootstrap file for both plugins + * `CakePlugin::load(array('DebugKit', 'ApiGenerator'))` + * + * will load the DebugKit and ApiGenerator plugins + * + * `CakePlugin::load(array('DebugKit', 'ApiGenerator'), array('bootstrap' => true))` + * + * will load bootstrap file for both plugins * * ``` * CakePlugin::load(array( @@ -107,13 +112,26 @@ class CakePlugin { * * ``` * CakePlugin::loadAll(array( - * array('bootstrap' => true), + * array('bootstrap' => true), * 'DebugKit' => array('routes' => true, 'bootstrap' => false), * )) * ``` * * The above example will load the bootstrap file for all plugins, but for DebugKit it will only load - * the routes file and will not look for any bootstrap script. + * the routes file and will not look for any bootstrap script. If you are loading + * many plugins that inconsistently support routes/bootstrap files, instead of detailing + * each plugin you can use the `ignoreMissing` option: + * + * ``` + * CakePlugin::loadAll(array( + * 'ignoreMissing' => true, + * 'bootstrap' => true, + * 'routes' => true, + * )); + * ``` + * + * The ignoreMissing option will do additional file_exists() calls but is simpler + * to use. * * @param array $options Options list. See CakePlugin::load() for valid options. * @return void