mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Document missing option in loadAll().
This commit is contained in:
parent
918c20c4cd
commit
6ffc9670d2
1 changed files with 22 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue