function _push_notifications_get_apns_certificate in Push Notifications 7
Get the full path to the APNS certificate.
Return value
string The path to the certificate file on the server.
3 calls to _push_notifications_get_apns_certificate()
- push_notifications_admin_form_submit in includes/
push_notifications.admin.inc - Submit callback for push notification configuration page.
- push_notifications_apns_feedback_service in ./
push_notifications.module - Connect to Apple's feedback server to remove unused device tokens. Connection modeled after daddyhunt_apns_send_notifications function.
- push_notifications_open_apns in ./
push_notifications.module - Open an APNS connection. Should be closed by calling fclose($connection) after usage.
File
- ./
push_notifications.module, line 1366 - Push Notifications functionality.
Code
function _push_notifications_get_apns_certificate() {
$path = variable_get('push_notifications_apns_certificate_folder', '');
if (empty($path)) {
$path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'certificates' . DIRECTORY_SEPARATOR;
}
$path .= PUSH_NOTIFICATIONS_APNS_CERTIFICATE;
if (!file_exists($path)) {
watchdog('push_notifications', 'Cannot find apns certificate file at @path', array(
'@path' => $path,
), WATCHDOG_WARNING, l(t('settings'), 'admin/config/services/push_notifications/configure'));
}
return $path;
}