function mailgun_check_library in Mailgun 7
Detect if Mailgun library is installed.
Return value
bool TRUE if library is installed, FALSE otherwise.
3 calls to mailgun_check_library()
- mailgun_admin_settings in ./
mailgun.admin.inc - Menu callback: displays the Mailgun module settings page.
- mailgun_get_client in ./
mailgun.module - Get the Mailgun client to access Mailgun's endpoints.
- mailgun_requirements in ./
mailgun.install - Implements hook_requirements().
File
- ./
mailgun.module, line 209 - Provides integration with Mailgun's email sending API.
Code
function mailgun_check_library() {
if (module_exists('libraries')) {
libraries_load('mailgun');
}
if (method_exists('\\Mailgun\\Mailgun', 'create')) {
return TRUE;
}
return FALSE;
}