You are here

public static function AcsfSite::load in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 src/AcsfSite.php \Drupal\acsf\AcsfSite::load()

Factory: loads the current site.

This method will load from static cache if available.

12 calls to AcsfSite::load()
AcsfDuplicationScrubInitializeHandler::handle in src/Event/AcsfDuplicationScrubInitializeHandler.php
Implements AcsfEventHandler::handle().
AcsfLog::log in src/AcsfLog.php
Logs the specified message to the Site Factory via the REST API.
AcsfSiteInfoHandler::handle in src/Event/AcsfSiteInfoHandler.php
Implements AcsfEventHandler::handle().
AcsfSiteTest::testFactoryLoadCache in tests/AcsfSiteTest.php
Tests that we can use the factory method to get a cached site.
AcsfThemeNotify::sendNotification in src/AcsfThemeNotify.php
Sends a theme notification to the Factory.

... See full list

File

src/AcsfSite.php, line 38

Class

AcsfSite
AcsfSite.

Namespace

Drupal\acsf

Code

public static function load() {
  if (!empty(self::$cache)) {
    return self::$cache;
  }
  self::$cache = new static();
  return self::$cache;
}