Skip to content

Core\WebPush

Sends push notifications to a browser (Web Push). The browser gives your page a subscription. Your server reads it with subscription. Each message is encrypted for that one browser, and only that browser can read it.

Members

3 members.

MemberSignature
subscriptionsubscription(string $json): Core\WebPush\Subscription
applicationServerKeyapplicationServerKey(Core\Crypto\KeyPair $vapid): string
sendsend(Core\WebPush\Subscription $to, bytes $payload, Core\Crypto\KeyPair $vapid, string $subject, int $ttl = 86400): Core\WebPush\Sent