You are here

interface PartyAcquisitionInterface in Party 7

Interface class for party acquisitions.

Hierarchy

Expanded class hierarchy of PartyAcquisitionInterface

All classes that implement PartyAcquisitionInterface

File

includes/party.acquisition.inc, line 10
Base classes for acquisition processes.

View source
interface PartyAcquisitionInterface {

  /**
   * Behavior bit flag to indicate we should do nothing.
   */
  const BEHAVIOR_NOTHING = 0x0;

  /**
   * Behavior bit flag to indicate we should create a new party.
   */
  const BEHAVIOR_CREATE = 0x1;

  /**
   * Behavior bit flag to indicate we should acquire the first.
   */
  const BEHAVIOR_FIRST = 0x2;

  /**
   * Failure code for no values to acquire on.
   */
  const FAIL_NO_VALUES = 0;

  /**
   * Failure code for no matches.
   */
  const FAIL_NO_MATCHES = 1;

  /**
   * Failure code for multiple matches.
   */
  const FAIL_MULTIPLE_MATCHES = 2;

  /**
   * Create or acquire a party based off the given parameters.
   *
   * @param array $values
   *   An array of primary fields to match on. Keys are the primary field and
   *   values are the expected values.
   * @param array $context
   *   An array of contextual information.
   * @param string $method
   *   Optionally pass a variable to be filled with the acquisition method.
   *
   * @return Party|FALSE
   *   The acquired or newly created party or FALSE on a failure.
   */
  public function acquire(array $values, array $context, &$method);

}

Members

Namesort descending Modifiers Type Description Overrides
PartyAcquisitionInterface::acquire public function Create or acquire a party based off the given parameters. 1
PartyAcquisitionInterface::BEHAVIOR_CREATE constant Behavior bit flag to indicate we should create a new party.
PartyAcquisitionInterface::BEHAVIOR_FIRST constant Behavior bit flag to indicate we should acquire the first.
PartyAcquisitionInterface::BEHAVIOR_NOTHING constant Behavior bit flag to indicate we should do nothing.
PartyAcquisitionInterface::FAIL_MULTIPLE_MATCHES constant Failure code for multiple matches.
PartyAcquisitionInterface::FAIL_NO_MATCHES constant Failure code for no matches.
PartyAcquisitionInterface::FAIL_NO_VALUES constant Failure code for no values to acquire on.