You are here

public function CDNBase::getConfiguration in Libraries CDN API 7

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

1 call to CDNBase::getConfiguration()
CDNBase::request in src/Type/CDNBase.php
Make an HTTP Request.

File

src/Type/CDNBase.php, line 34
Class CDNBase.

Class

CDNBase
Class CDNBase.

Namespace

Drupal\libraries_cdn\Type

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;
  }
}