From c3450ddc7984a216cc34b51222fe8c3f668e3c34 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Tue, 12 Jul 2022 12:37:53 +0900 Subject: [PATCH] Issue #3293431 by longwave: Remove obsolete AppRootFactory and SitePathFactory --- core/lib/Drupal/Core/AppRootFactory.php | 37 ------------------------ core/lib/Drupal/Core/SitePathFactory.php | 37 ------------------------ 2 files changed, 74 deletions(-) delete mode 100644 core/lib/Drupal/Core/AppRootFactory.php delete mode 100644 core/lib/Drupal/Core/SitePathFactory.php diff --git a/core/lib/Drupal/Core/AppRootFactory.php b/core/lib/Drupal/Core/AppRootFactory.php deleted file mode 100644 index 892492380e04..000000000000 --- a/core/lib/Drupal/Core/AppRootFactory.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Drupal\Core; - -/** - * Gets the app root from the kernel. - */ -class AppRootFactory { - - /** - * The Drupal kernel. - * - * @var \Drupal\Core\DrupalKernelInterface - */ - protected $drupalKernel; - - /** - * Constructs an AppRootFactory instance. - * - * @param \Drupal\Core\DrupalKernelInterface $drupal_kernel - * The Drupal kernel. - */ - public function __construct(DrupalKernelInterface $drupal_kernel) { - $this->drupalKernel = $drupal_kernel; - } - - /** - * Gets the app root. - * - * @return string - * The app root. - */ - public function get() { - return $this->drupalKernel->getContainer()->getParameter('app.root'); - } - -} diff --git a/core/lib/Drupal/Core/SitePathFactory.php b/core/lib/Drupal/Core/SitePathFactory.php deleted file mode 100644 index e83daf25a080..000000000000 --- a/core/lib/Drupal/Core/SitePathFactory.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Drupal\Core; - -/** - * Gets the site path from the kernel. - */ -class SitePathFactory { - - /** - * The Drupal kernel. - * - * @var \Drupal\Core\DrupalKernelInterface - */ - protected $drupalKernel; - - /** - * Constructs a SitePathFactory instance. - * - * @param \Drupal\Core\DrupalKernelInterface $drupal_kernel - * The Drupal kernel. - */ - public function __construct(DrupalKernelInterface $drupal_kernel) { - $this->drupalKernel = $drupal_kernel; - } - - /** - * Gets the site path. - * - * @return string - * The site path. - */ - public function get() { - return $this->drupalKernel->getContainer()->getParameter('site.path'); - } - -} -- GitLab