You are here

public static function BackendBase::platformInfo in Acquia Purge 8

Get the information object interfacing with the Acquia platform.

Parameters

null|\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface $set: Set the object initially.

Return value

\Drupal\acquia_purge\AcquiaCloud\PlatformInfoInterface Information object interfacing with the Acquia platform.

Throws

\RuntimeException Thrown when the object hasn't been set yet.

Overrides BackendInterface::platformInfo

1 call to BackendBase::platformInfo()
FastlyBackend::__construct in src/AcquiaPlatformCdn/FastlyBackend.php
Construct a vendor backend for the Platform CDN purger.

File

src/AcquiaPlatformCdn/BackendBase.php, line 65

Class

BackendBase
Provides a backend for the Platform CDN purger.

Namespace

Drupal\acquia_purge\AcquiaPlatformCdn

Code

public static function platformInfo(PlatformInfoInterface $set = NULL) {
  static $platforminfo;
  if (is_null($platforminfo) && !is_null($set)) {
    $platforminfo = $set;
  }
  elseif (is_null($platforminfo)) {
    throw new \RuntimeException("BackendBase::platformInfo can't deliver requested instance.");
  }
  return $platforminfo;
}