Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Utils / Site.php
index 72d1ab52bb4aa0ec795d7bff78fde35b13bf2706..46fbc86cf8842b2d2d56d357304212f44c4a98a6 100644 (file)
@@ -38,8 +38,7 @@ class Site
     public function __construct(
         $appRoot,
         ConfigurationManager $configurationManager
-    )
-    {
+    ) {
         $this->appRoot = $appRoot;
         $this->configurationManager = $configurationManager;
     }
@@ -220,7 +219,7 @@ class Site
         if ($cacheDirectory) {
             if (strpos($cacheDirectory, '/') != 0) {
                 $cacheDirectory = $this->configurationManager
-                        ->getApplicationDirectory() . '/' . $cacheDirectory;
+                    ->getApplicationDirectory() . '/' . $cacheDirectory;
             }
             $cacheDirectories[] = $cacheDirectory . '/' . $siteId . '/';
         }
@@ -255,4 +254,21 @@ class Site
             return false;
         }
     }
+
+    public function cachedServicesFile()
+    {
+        return $this->getCacheDirectory().'/console.services.yml';
+    }
+
+    public function cachedServicesFileExists()
+    {
+        return file_exists($this->cachedServicesFile());
+    }
+
+    public function removeCachedServicesFile()
+    {
+        if ($this->cachedServicesFileExists()) {
+            unlink($this->cachedServicesFile());
+        }
+    }
 }