You are here

class SearchApiDummyService in Search API 7

Dummy service for testing.

Hierarchy

Expanded class hierarchy of SearchApiDummyService

1 string reference to 'SearchApiDummyService'
search_api_test_2_search_api_service_info in tests/search_api_test_2.module
Implements hook_search_api_service_info().

File

tests/search_api_test_2.module, line 39
Provides a second test service and server for testing Search API.

View source
class SearchApiDummyService implements SearchApiServiceInterface {

  /**
   * {@inheritdoc}
   */
  public function __construct(\SearchApiServer $server) {
  }

  /**
   * {@inheritdoc}
   */
  public function configurationForm(array $form, array &$form_state) {
    return array();
  }

  /**
   * {@inheritdoc}
   */
  public function configurationFormValidate(array $form, array &$values, array &$form_state) {
  }

  /**
   * {@inheritdoc}
   */
  public function configurationFormSubmit(array $form, array &$values, array &$form_state) {
  }

  /**
   * {@inheritdoc}
   */
  public function supportsFeature($feature) {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function viewSettings() {
    return array();
  }

  /**
   * {@inheritdoc}
   */
  public function postCreate() {
  }

  /**
   * {@inheritdoc}
   */
  public function postUpdate() {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function preDelete() {
  }

  /**
   * {@inheritdoc}
   */
  public function addIndex(SearchApiIndex $index) {
  }

  /**
   * {@inheritdoc}
   */
  public function fieldsUpdated(SearchApiIndex $index) {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function removeIndex($index) {
  }

  /**
   * {@inheritdoc}
   */
  public function indexItems(SearchApiIndex $index, array $items) {
    return array();
  }

  /**
   * {@inheritdoc}
   */
  public function deleteItems($ids = 'all', SearchApiIndex $index = NULL) {
  }

  /**
   * {@inheritdoc}
   */
  public function query(SearchApiIndex $index, $options = array()) {
    throw new SearchApiException("The dummy service doesn't support queries");
  }

  /**
   * {@inheritdoc}
   */
  public function search(SearchApiQueryInterface $query) {
    return array();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SearchApiDummyService::addIndex public function Adds a new index to this server. Overrides SearchApiServiceInterface::addIndex
SearchApiDummyService::configurationForm public function Form constructor for the server configuration form. Overrides SearchApiServiceInterface::configurationForm
SearchApiDummyService::configurationFormSubmit public function Submit callback for the form returned by configurationForm(). Overrides SearchApiServiceInterface::configurationFormSubmit
SearchApiDummyService::configurationFormValidate public function Validation callback for the form returned by configurationForm(). Overrides SearchApiServiceInterface::configurationFormValidate
SearchApiDummyService::deleteItems public function Deletes indexed items from this server. Overrides SearchApiServiceInterface::deleteItems
SearchApiDummyService::fieldsUpdated public function Notifies the server that the field settings for the index have changed. Overrides SearchApiServiceInterface::fieldsUpdated
SearchApiDummyService::indexItems public function Indexes the specified items. Overrides SearchApiServiceInterface::indexItems
SearchApiDummyService::postCreate public function Reacts to the server's creation. Overrides SearchApiServiceInterface::postCreate
SearchApiDummyService::postUpdate public function Notifies this server that its fields are about to be updated. Overrides SearchApiServiceInterface::postUpdate
SearchApiDummyService::preDelete public function Notifies this server that it is about to be deleted from the database. Overrides SearchApiServiceInterface::preDelete
SearchApiDummyService::query public function Creates a query object for searching on an index lying on this server. Overrides SearchApiServiceInterface::query
SearchApiDummyService::removeIndex public function Removes an index from this server. Overrides SearchApiServiceInterface::removeIndex
SearchApiDummyService::search public function Executes a search on the server represented by this object. Overrides SearchApiServiceInterface::search
SearchApiDummyService::supportsFeature public function Determines whether this service class supports a given feature. Overrides SearchApiServiceInterface::supportsFeature
SearchApiDummyService::viewSettings public function Displays this server's settings. Overrides SearchApiServiceInterface::viewSettings
SearchApiDummyService::__construct public function Constructs a service object. Overrides SearchApiServiceInterface::__construct