Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Latest commit

 

History

History
75 lines (51 loc) · 1.56 KB

File metadata and controls

75 lines (51 loc) · 1.56 KB

Mobile Channel

Purpose

The Mobile channel is sending messages as mobile push notification via the NotificationPusher library.

Requirements

If you want to use this channel, the NotificationPusher library must be installed.

Configuration

Channel configuration

yokai_messenger:
    channels:
        mobile:
            environment: dev # or prod
            apns:
                certificate: /path/to/your/apns-certificate.pem
                pass_phrase: example
            gcm:
                api_key:     YourApiKey

If you do not understand these parameters, please see the library documentation.

Messages configuration

yokai_messenger:
    messages:
        -
            id:       <up to you>
            channels: mobile # or [mobile, <any other channels ...>]

Registering messages manually

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Yokai\MessengerBundle\DependencyInjection\Factory\MessageDefinitionFactory;

public function load(array $configs, ContainerBuilder $container)
{
    MessageDefinitionFactory::create($container, '<up to you>', ['mobile'], [], []);
}

Recipient

This channel supports :

  • objects that implements Yokai\MessengerBundle\Recipient\MobileRecipientInterface interface

Specificities

None.