You are here

public function NetworkBase::getSdk in Social API 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/NetworkBase.php \Drupal\social_api\Plugin\NetworkBase::getSdk()
  2. 3.x src/Plugin/NetworkBase.php \Drupal\social_api\Plugin\NetworkBase::getSdk()

Gets the underlying SDK library.

Return value

mixed The SDK client.

Overrides NetworkInterface::getSdk

File

src/Plugin/NetworkBase.php, line 119

Class

NetworkBase
Base class for Social Network plugins.

Namespace

Drupal\social_api\Plugin

Code

public function getSdk() {
  if (empty($this->sdk)) {
    $this->sdk = $this
      ->initSdk();
  }
  return $this->sdk;
}