search_api_algolia.module in Search API Algolia 7
Same filename and directory in other branches
Main module file for search_api_algolia.
File
search_api_algolia.moduleView source
<?php
/**
* @file
* Main module file for search_api_algolia.
*/
/**
* Implements hook_info().
*/
function search_api_algolia_search_api_service_info() {
$services['algolia'] = array(
'name' => t('Algolia'),
'description' => t('Provides integration with the Algolia search engine service'),
'class' => 'SearchApiAlgoliaService',
);
return $services;
}
/**
* Implements hook_libraries_info().
*
* For defining external libraries.
*/
function search_api_algolia_libraries_info() {
// A very simple library. No changing APIs (hence, no versions), no variants.
// Expected to be extracted into 'sites/all/libraries/simple'.
$libraries['algolia'] = array(
'name' => 'Algolia PHP library',
'vendor url' => 'https://www.algolia.com/',
'download url' => 'https://github.com/algolia/algoliasearch-client-php',
'version callback' => 'search_api_algolia_libraries_version_callback',
'files' => array(
'php' => array(
'algoliasearch.php',
),
),
);
return $libraries;
}
/**
* Defines the version number of the external algolia library.
*
* @todo
*/
function search_api_algolia_libraries_version_callback() {
// Use some fancy magic to get the version number... or don't
return TRUE;
}
Functions
Name | Description |
---|---|
search_api_algolia_libraries_info | Implements hook_libraries_info(). |
search_api_algolia_libraries_version_callback | Defines the version number of the external algolia library. |
search_api_algolia_search_api_service_info | Implements hook_info(). |