Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Commit

Permalink
Adding chrome support
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamlet committed Jul 5, 2016
1 parent 24836ae commit a4f479c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PHPush

PHPush is a PHP package that provide a simple API to send push notifications to foreign platforms.

Currently, we support only 2 platforms - Android and iOS.
Currently, we support 3 platforms - Android, iOS, and Google Chrome.

Installation
-----------
Expand Down Expand Up @@ -38,6 +38,7 @@ $queue = PHPush::Queue();

// Adding some devices
$queue->add(new \PHPush\providers\android\Device('android_registration_id'));
$queue->add(new \PHPush\providers\chrome\Device('chrome_registration_id'));
$queue->add(new \PHPush\providers\ios\Device('ios_device_token'));

// Setting message
Expand Down
2 changes: 1 addition & 1 deletion src/PHPush/providers/android/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Device implements \PHPush\providers\Device {
*
* @var string
*/
private $device_token;
protected $device_token;

/**
* Setting device token
Expand Down
2 changes: 1 addition & 1 deletion src/PHPush/providers/android/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Provider implements \PHPush\providers\Provider {
*
* @var string
*/
private $access_key = '';
protected $access_key = '';

/**
* Setting Access Key
Expand Down
14 changes: 14 additions & 0 deletions src/PHPush/providers/chrome/Device.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php


namespace PHPush\providers\chrome;


/**
* Class Device
*
* @package PHPush\providers\chrome
*/
class Device extends \PHPush\providers\android\Device {

}
12 changes: 12 additions & 0 deletions src/PHPush/providers/chrome/Provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PHPush\providers\chrome;

/**
* Class Provider
*
* @package PHPush\providers\chrome
*/
class Provider extends \PHPush\providers\android\Provider {

}
2 changes: 1 addition & 1 deletion src/PHPush/providers/ios/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Device implements \PHPush\providers\Device {
*
* @var string
*/
private $device_token;
protected $device_token;

/**
* Setting device token
Expand Down
6 changes: 3 additions & 3 deletions src/PHPush/providers/ios/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class Provider implements \PHPush\providers\Provider {
*
* @var string
*/
private $certificate = '';
protected $certificate = '';

private $stream_socket = null;
protected $stream_socket = null;

/**
* Not using for this provider
Expand Down Expand Up @@ -113,7 +113,7 @@ public function send($message, $devices, $custom_fields = array()) {
*
* @return null|resource
*/
private function get_stream_socket($remote_path, $passphrase) {
protected function get_stream_socket($remote_path, $passphrase) {

if (is_null($this->stream_socket)) {

Expand Down

0 comments on commit a4f479c

Please sign in to comment.