You are here

interface NetworkInterface in Social API 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/NetworkInterface.php \Drupal\social_api\Plugin\NetworkInterface
  2. 3.x src/Plugin/NetworkInterface.php \Drupal\social_api\Plugin\NetworkInterface

Defines an interface for Social Network plugins.

Hierarchy

Expanded class hierarchy of NetworkInterface

All classes that implement NetworkInterface

File

src/Plugin/NetworkInterface.php, line 11

Namespace

Drupal\social_api\Plugin
View source
interface NetworkInterface extends PluginInspectionInterface, ContainerFactoryPluginInterface {

  /**
   * Authenticates the request with the SDK library.
   *
   * Most of the time this will just mean settings some state properties for so
   * the publish method can pass them along to the external SDK library. The
   * authentication is considered to be at the plugin level. If your network
   * implementation needs the authentication to happen at every request,
   * implement that business logic in doPost.
   */
  public function authenticate();

  /**
   * Gets the underlying SDK library.
   *
   * @return mixed
   *   The SDK client.
   */
  public function getSdk();

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
NetworkInterface::authenticate public function Authenticates the request with the SDK library. 1
NetworkInterface::getSdk public function Gets the underlying SDK library. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2