Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / AppRootFactory.php
1 <?php
2
3 namespace Drupal\Core;
4
5 /**
6  * Gets the app root from the kernel.
7  */
8 class AppRootFactory {
9
10   /**
11    * The Drupal kernel.
12    *
13    * @var \Drupal\Core\DrupalKernelInterface
14    */
15   protected $drupalKernel;
16
17   /**
18    * Constructs an AppRootFactory instance.
19    *
20    * @param \Drupal\Core\DrupalKernelInterface $drupal_kernel
21    *   The Drupal kernel.
22    */
23   public function __construct(DrupalKernelInterface $drupal_kernel) {
24     $this->drupalKernel = $drupal_kernel;
25   }
26
27   /**
28    * Gets the app root.
29    *
30    * @return string
31    */
32   public function get() {
33     return $this->drupalKernel->getAppRoot();
34   }
35
36 }