You are here

public function CdnBase::getConfiguration in Libraries CDN API 8

Return the configuration of the object.

Parameters

string $key: A key of configuration.

Return value

mixed If a configuration item has a value for the key parameter in the configuration array, then the function will return it, otherwise, the whole configuration array is returned.

Overrides CdnBaseInterface::getConfiguration

File

src/CdnBase.php, line 33
Class CdnBase.

Class

CdnBase
Class CdnBase.

Namespace

Drupal\libraries_cdn

Code

public function getConfiguration($key = NULL) {
  if (isset($key) && is_string($key)) {
    if (isset($this->configuration[$key])) {
      return $this->configuration[$key];
    }
    else {
      return NULL;
    }
  }
  else {
    return $this->configuration;
  }
}