In cases where an extension has multiple API modules that
have the same exact factory requirements, it would let them
use the same factory function and check with the module manager
what the class name to construct should be. This is already possible
using getNamesWithClasses, but this makes it much more
straightforward.
Change-Id: I889e3e6f15907896a8df376913125d903debe984
- Added newline at end of files
- Added/Removed spaces around comma, parentheses and negation
- Added space after function word
Change-Id: I2dd338153aeb5f07702ba015945e95c7d0ae673b
This enables factory functions to be registered for API modules,
in addition to the module class itself. This allows modules to
use proper dependency injection via the modules constructor.
Example:
$wgAPIModules['foo'] = array(
'class' => 'ApiFoo',
'factory' => function( $main, $action ) { ... }
)
Change-Id: Ieb85493a7765f466317f5fa74b0b0e262220deab