Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 123 | All time: 9,468 This week: 524 |
Version | License | PHP version | Categories | |||
yii2-notymo 1.0.0 | Custom (specified... | 5 | PHP 5, Wireless and Mobile, Web services |
Description | Author | |||||||||||||||||||||||
This package can be used to send iOS and Android push notifications. |
|
The iOS and Android push notification extension for Yii2.
The suggested installation method is via composer:
$ composer require nstdio/yii2-notymo: "dev-master"
or add
"nstdio/yii2-notymo": "dev-master"
to the require
section of your composer.json
file.
// web.php or console.php
'component' => [
// ...
'notymo' => [
'class' => 'nstdio\yii2notymo\PushNotification',
'push' => [
// If you d?n't want to use one of the services we can just skip them loading.
// It's obvious that the skipped service is not necessary to configure.
// 'skipApns' => true,
// 'skipGcm' => true,
'apns' => [
'live' => true, // Whether to use live credentials.
'cert' => 'path/to/apns_live_cert.pem',
'sandboxCert' => 'path/to/apns_sandbox_cert.pem',
],
'gcm' => [
'apiKey' => 'api_key' // Here goes GCM Service API key.
],
],
'dataProvider' => [
'class' => 'nstdio\yii2notymo\provider\SQLDataProvider',
'table' => 'device_token', // The table from which the data will be obtained.
'identifier' => 'user_id', // The identifier that defines the criteria for what data will be obtained. In this case, it is the column name from the table.
'apns' => 'apns_token', // The column name for APNS device tokens.
'gcm' => 'gcm_token', // The column name for GCM device tokens.
],
],
],
// For example SiteController.php
use nstdio\notymo\Message;
// ...
$userIds = [1, 2, 3, 4, 5];
/ @var \nstdio\yii2notymo\PushNotification $push */
$push = Yii::$app->notymo;
$msg = new Message();
$msg->setMessage("Test msg.");
$push->send($msg, $userIds); // Message will be sent to mentioned users.
Files (20) |
File | Role | Description | ||
---|---|---|---|---|
.idea (1 file) | ||||
provider (3 files) | ||||
tests (3 files, 3 directories) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
mongodb-setup.sh | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
PushNotification.php | Class | Class source | ||
README.md | Doc. | Documentation |
Files (20) | / | provider |
File | Role | Description |
---|---|---|
DataProvider.php | Class | Class source |
MongoDataProvider.php | Class | Class source |
SQLDataProvider.php | Class | Class source |
Files (20) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
config (2 files) | ||||
fixtures (1 file, 1 directory) | ||||
migrations (1 file) | ||||
bootstrap.php | Aux. | Auxiliary script | ||
SQLDataProviderTest.php | Class | Class source | ||
TestCase.php | Class | Class source |
Files (20) | / | tests | / | config |
File | Role | Description |
---|---|---|
db.php | Aux. | Auxiliary script |
params.php | Aux. | Auxiliary script |
Files (20) | / | tests | / | fixtures |
File | Role | Description | ||
---|---|---|---|---|
data (1 file) | ||||
DeviceTokenFixture.php | Class | Class source |
Files (20) | / | tests | / | migrations |
File | Role | Description |
---|---|---|
m161002_171521_cre...ice_token_table.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.