You are here

interface FeedsAccountSwitcherInterface in Feeds 7.2

Defines an interface for a service for safe account switching.

Hierarchy

Expanded class hierarchy of FeedsAccountSwitcherInterface

All classes that implement FeedsAccountSwitcherInterface

File

includes/FeedsAccountSwitcherInterface.inc, line 11
Contains FeedsAccountSwitcherInterface interface.

View source
interface FeedsAccountSwitcherInterface {

  /**
   * Safely switches to another account.
   *
   * Each invocation of FeedsAccountSwitcherInterface::switchTo() must be
   * matched by a corresponding invocation of
   * FeedsAccountSwitcherInterface::switchBack() in the same function.
   *
   * @param object $account
   *   The account to switch to.
   *
   * @return FeedsAccountSwitcherInterface
   *   $this.
   */
  public function switchTo($account);

  /**
   * Reverts to a previous account after switching.
   *
   * @return FeedsAccountSwitcherInterface
   *   $this.
   *
   * @throws FeedsAccountSwitcherException
   *   When there are no more account switches to revert.
   */
  public function switchBack();

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsAccountSwitcherInterface::switchBack public function Reverts to a previous account after switching. 1
FeedsAccountSwitcherInterface::switchTo public function Safely switches to another account. 1