EclipseGc

index.php

Feb 3rd, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * The PHP page that serves all page requests on a Drupal installation.
  6.  *
  7.  * The routines here dispatch control to the appropriate handler, which then
  8.  * prints the appropriate page.
  9.  *
  10.  * All Drupal code is released under the GNU General Public License.
  11.  * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
  12.  */
  13.  
  14. /**
  15.  * Root directory of Drupal installation.
  16.  */
  17. define('DRUPAL_ROOT', getcwd());
  18.  
  19. require_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
  20. // Include and activate the class loader.
  21. $loader = drupal_classloader();
  22.  
  23. // Register explicit vendor namespaces.
  24. $loader->registerNamespaces(array(
  25.   // All Symfony-borrowed code lives in /core/includes/Symfony.
  26.   'Symfony' => DRUPAL_ROOT . '/core/includes',
  27. ));
  28. // Register the Drupal namespace for classes in core as a fallback.
  29. // This allows to register additional namespaces within the Drupal namespace
  30. // (e.g., for modules) and avoids an additional file_exists() on the Drupal
  31. // core namespace, since the class loader can already determine the best
  32. // namespace match based on a string comparison. It further allows modules to
  33. // register/overload namespaces in Drupal core.
  34. $loader->registerNamespaceFallbacks(array(
  35.   // All Drupal-namespaced code in core lives in /core/includes/Drupal.
  36.   'Drupal' => DRUPAL_ROOT . '/core/includes',
  37. ));
  38. // Register the Pimple Prefix.
  39. $loader->registerPrefix('Pimple', DRUPAL_ROOT . '/core/includes');
  40.  
  41. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  42. $container = drupal_container();
  43. $container['kernel']->send();
Advertisement
Add Comment
Please, Sign In to add comment