drupal_classloader_register($name, $path)
Registers an additional namespace.
string $name: The namespace component to register; e.g., 'node'.
string $path: The relative path to the Drupal component in the filesystem.
function drupal_classloader_register($name, $path) { $loader = \Drupal::service('class_loader'); $loader->addPsr4('Drupal\\' . $name . '\\', \Drupal::root() . '/' . $path . '/src'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!bootstrap.inc/function/drupal_classloader_register/8.1.x