Document missing option in loadAll().

This commit is contained in:
mark_story 2015-05-13 22:34:46 -04:00
parent 918c20c4cd
commit 6ffc9670d2

View file

@ -48,8 +48,13 @@ class CakePlugin {
* *
* It is also possible to load multiple plugins at once. Examples: * 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'))`
* `CakePlugin::load(array('DebugKit', 'ApiGenerator'), array('bootstrap' => true))` will load bootstrap file for both plugins *
* 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( * CakePlugin::load(array(
@ -107,13 +112,26 @@ class CakePlugin {
* *
* ``` * ```
* CakePlugin::loadAll(array( * CakePlugin::loadAll(array(
* array('bootstrap' => true), * array('bootstrap' => true),
* 'DebugKit' => array('routes' => true, 'bootstrap' => false), * '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 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. * @param array $options Options list. See CakePlugin::load() for valid options.
* @return void * @return void