Commit 4f18d622 authored by donquixote's avatar donquixote Committed by webchick

Issue #2083547 by donquixote: Docblock and code style improvements in DrupalKernel.

This is in preparation for the switch of module-provided classes from PSR-0 to PSR-4.
parent 1a5d1fc7
......@@ -249,7 +249,6 @@ public function discoverServiceProviders() {
return $serviceProviders;
}
/**
* {@inheritdoc}
*/
......@@ -681,7 +680,11 @@ protected function getModulesParameter() {
}
/**
* Returns the file name for each enabled module.
* Gets the file name for each enabled module.
*
* @return array
* Array where each key is a module name, and each value is a path to the
* respective *.module or *.profile file.
*/
protected function getModuleFileNames() {
$filenames = array();
......@@ -694,18 +697,31 @@ protected function getModuleFileNames() {
}
/**
* Gets the namespaces of each enabled module.
* Gets the PSR-0 base directories for module namespaces.
*
* @param array $module_file_names
* Array where each key is a module name, and each value is a path to the
* respective *.module or *.profile file.
*
* @return array
* Array where each key is a module namespace like 'Drupal\system', and each
* value is a PSR-0 base directory associated with the module namespace.
*/
protected function getModuleNamespaces($moduleFileNames) {
protected function getModuleNamespaces($module_file_names) {
$namespaces = array();
foreach ($moduleFileNames as $module => $filename) {
foreach ($module_file_names as $module => $filename) {
$namespaces["Drupal\\$module"] = DRUPAL_ROOT . '/' . dirname($filename) . '/lib';
}
return $namespaces;
}
/**
* Registers a list of namespaces.
* Registers a list of namespaces with PSR-0 directories for class loading.
*
* @param array $namespaces
* Array where each key is a namespace like 'Drupal\system', and each value
* is either a PSR-0 base directory, or an array of PSR-0 base directories
* associated with this namespace.
*/
protected function registerNamespaces(array $namespaces = array()) {
foreach ($namespaces as $prefix => $path) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment