eaiovnaovbqoebvqoeavibavo PK{Z_00$php-firebase-cloud-messaging/LICENSEnu[The MIT License (MIT) Copyright (c) 2016 sngrl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK{ZK*php-firebase-cloud-messaging/composer.locknu[{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], "hash": "ab504c85e705ff02c8dcbe03332f6141", "content-hash": "ef84c0b0bad4a256d5df81efde036b38", "packages": [ { "name": "guzzlehttp/guzzle", "version": "6.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", "reference": "d094e337976dff9d8e2424e8485872194e768662" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", "reference": "d094e337976dff9d8e2424e8485872194e768662", "shasum": "" }, "require": { "guzzlehttp/promises": "~1.0", "guzzlehttp/psr7": "~1.1", "php": ">=5.5.0" }, "require-dev": { "ext-curl": "*", "phpunit/phpunit": "~4.0", "psr/log": "~1.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.2-dev" } }, "autoload": { "files": [ "src/functions_include.php" ], "psr-4": { "GuzzleHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "Guzzle is a PHP HTTP client library", "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", "rest", "web service" ], "time": "2016-03-21 20:02:09" }, { "name": "guzzlehttp/promises", "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", "shasum": "" }, "require": { "php": ">=5.5.0" }, "require-dev": { "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "Guzzle promises library", "keywords": [ "promise" ], "time": "2016-05-18 16:56:05" }, { "name": "guzzlehttp/psr7", "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", "reference": "31382fef2889136415751badebbd1cb022a4ed72" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72", "reference": "31382fef2889136415751badebbd1cb022a4ed72", "shasum": "" }, "require": { "php": ">=5.4.0", "psr/http-message": "~1.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" }, "files": [ "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" } ], "description": "PSR-7 message implementation", "keywords": [ "http", "message", "stream", "uri" ], "time": "2016-04-13 19:56:01" }, { "name": "psr/http-message", "version": "1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", "keywords": [ "http", "http-message", "psr", "psr-7", "request", "response" ], "time": "2015-05-04 20:22:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, "require": { "php": ">=5.3,<8.0-DEV" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "~4.0", "squizlabs/php_codesniffer": "~2.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", "homepage": "http://ocramius.github.com/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://github.com/doctrine/instantiator", "keywords": [ "constructor", "instantiate" ], "time": "2015-06-14 21:17:01" }, { "name": "hamcrest/hamcrest-php", "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", "shasum": "" }, "require": { "php": ">=5.3.2" }, "replace": { "cordoval/hamcrest-php": "*", "davedevelopment/hamcrest-php": "*", "kodova/hamcrest-php": "*" }, "require-dev": { "phpunit/php-file-iterator": "1.3.3", "satooshi/php-coveralls": "dev-master" }, "type": "library", "autoload": { "classmap": [ "hamcrest" ], "files": [ "hamcrest/Hamcrest.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD" ], "description": "This is the PHP port of Hamcrest Matchers", "keywords": [ "test" ], "time": "2015-05-11 14:41:42" }, { "name": "mockery/mockery", "version": "0.9.5", "source": { "type": "git", "url": "https://github.com/padraic/mockery.git", "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/padraic/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~1.1", "lib-pcre": ">=7.0", "php": ">=5.3.2" }, "require-dev": { "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "0.9.x-dev" } }, "autoload": { "psr-0": { "Mockery": "library/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", "homepage": "http://blog.astrumfutura.com" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", "homepage": "http://davedevelopment.co.uk" } ], "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", "homepage": "http://github.com/padraic/mockery", "keywords": [ "BDD", "TDD", "library", "mock", "mock objects", "mockery", "stub", "test", "test double", "testing" ], "time": "2016-05-22 21:52:33" }, { "name": "myclabs/deep-copy", "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", "reference": "a8773992b362b58498eed24bf85005f363c34771" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", "reference": "a8773992b362b58498eed24bf85005f363c34771", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { "doctrine/collections": "1.*", "phpunit/phpunit": "~4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", "duplicate", "object", "object graph" ], "time": "2015-11-20 12:04:31" }, { "name": "phpdocumentor/reflection-docblock", "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.0" }, "suggest": { "dflydev/markdown": "~1.0", "erusev/parsedown": "~1.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "psr-0": { "phpDocumentor": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "mike.vanriel@naenius.com" } ], "time": "2015-02-03 12:10:50" }, { "name": "phpspec/prophecy", "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "~2.0", "sebastian/comparator": "~1.1", "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpspec/phpspec": "~2.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.5.x-dev" } }, "autoload": { "psr-0": { "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Konstantin Kudryashov", "email": "ever.zet@gmail.com", "homepage": "http://everzet.com" }, { "name": "Marcello Duarte", "email": "marcello.duarte@gmail.com" } ], "description": "Highly opinionated mocking framework for PHP 5.3+", "homepage": "https://github.com/phpspec/prophecy", "keywords": [ "Double", "Dummy", "fake", "mock", "spy", "stub" ], "time": "2016-02-15 07:46:21" }, { "name": "phpunit/php-code-coverage", "version": "3.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", "reference": "44cd8e3930e431658d1a5de7d282d5cb37837fd5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/44cd8e3930e431658d1a5de7d282d5cb37837fd5", "reference": "44cd8e3930e431658d1a5de7d282d5cb37837fd5", "shasum": "" }, "require": { "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "^1.4.2", "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", "phpunit/phpunit": "~5" }, "suggest": { "ext-dom": "*", "ext-xdebug": ">=2.4.0", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.3.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ "coverage", "testing", "xunit" ], "time": "2016-05-27 16:24:29" }, { "name": "phpunit/php-file-iterator", "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ "filesystem", "iterator" ], "time": "2015-06-21 13:08:43" }, { "name": "phpunit/php-text-template", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Simple template engine.", "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ "template" ], "time": "2015-06-21 13:50:34" }, { "name": "phpunit/php-timer", "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4|~5" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ "timer" ], "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", "homepage": "https://github.com/sebastianbergmann/php-token-stream/", "keywords": [ "tokenizer" ], "time": "2015-09-15 10:49:45" }, { "name": "phpunit/phpunit", "version": "5.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", "reference": "00dd95ffb48805503817ced06399017df315fe5c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/00dd95ffb48805503817ced06399017df315fe5c", "reference": "00dd95ffb48805503817ced06399017df315fe5c", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", "phpunit/php-code-coverage": "^3.3.0", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.1", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", "sebastian/object-enumerator": "~1.0", "sebastian/resource-operations": "~1.0", "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { "dev-master": "5.3.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "The PHP Unit Testing framework.", "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], "time": "2016-05-11 13:28:45" }, { "name": "phpunit/phpunit-mock-objects", "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "reference": "151c96874bff6fe61a25039df60e776613a61489" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/151c96874bff6fe61a25039df60e776613a61489", "reference": "151c96874bff6fe61a25039df60e776613a61489", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": ">=5.6", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { "phpunit/phpunit": "~5" }, "suggest": { "ext-soap": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sb@sebastian-bergmann.de", "role": "lead" } ], "description": "Mock Object library for PHPUnit", "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "keywords": [ "mock", "xunit" ], "time": "2016-04-20 14:39:26" }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", "shasum": "" }, "require": { "php": ">=5.6" }, "require-dev": { "phpunit/phpunit": "~5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "time": "2016-02-13 06:45:14" }, { "name": "sebastian/comparator", "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", "homepage": "http://www.github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], "time": "2015-07-26 15:48:44" }, { "name": "sebastian/diff", "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.3.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides functionality to handle HHVM/PHP environments", "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", "hhvm" ], "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", "reference": "7ae5513327cb536431847bcc0c10edba2701064e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", "reference": "7ae5513327cb536431847bcc0c10edba2701064e", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Volker Dusch", "email": "github@wallbash.com" }, { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides the functionality to export PHP variables for visualization", "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "time": "2015-06-21 07:55:53" }, { "name": "sebastian/global-state", "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.2" }, "suggest": { "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Snapshotting of global state", "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "time": "2015-10-12 03:26:01" }, { "name": "sebastian/object-enumerator", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", "shasum": "" }, "require": { "php": ">=5.6", "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpunit/phpunit": "~5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "time": "2016-01-28 13:25:10" }, { "name": "sebastian/recursion-context", "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, { "name": "Adam Harvey", "email": "aharvey@php.net" } ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2015-11-11 19:50:13" }, { "name": "sebastian/resource-operations", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { "php": ">=5.6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2015-07-28 20:34:47" }, { "name": "sebastian/version", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", "shasum": "" }, "require": { "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "lead" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-02-04 12:56:52" }, { "name": "symfony/yaml", "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", "shasum": "" }, "require": { "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", "time": "2016-05-26 21:46:24" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=5.5" }, "platform-dev": [] } PK{Z s-php-firebase-cloud-messaging/phpunit.xml.distnu[ tests src src/ PK{Z|)G2php-firebase-cloud-messaging/tests/MessageTest.phpnu[fixture = new Message(); } public function testThrowsExceptionWhenDifferentRecepientTypesAreRegistered() { $this->setExpectedException(\InvalidArgumentException::class); $this->fixture->addRecipient(new Topic('breaking-news')) ->addRecipient(new Recipient()); } public function testThrowsExceptionWhenNoRecepientWasAdded() { $this->setExpectedException(\UnexpectedValueException::class); $this->fixture->jsonSerialize(); } public function testThrowsExceptionWhenMultipleTopicsWereGiven() { $this->setExpectedException(\UnexpectedValueException::class); $this->fixture->addRecipient(new Topic('breaking-news')) ->addRecipient(new Topic('another topic')); $this->fixture->jsonSerialize(); } public function testJsonEncodeWorksOnTopicRecipients() { $body = '{"to":"\/topics\/breaking-news","notification":{"title":"test","body":"a nice testing notification"}}'; $notification = new Notification('test', 'a nice testing notification'); $message = new Message(); $message->setNotification($notification); $message->addRecipient(new Topic('breaking-news')); $this->assertSame( $body, json_encode($message) ); } public function testJsonEncodeWorksOnDeviceRecipients() { $body = '{"to":"deviceId","notification":{"title":"test","body":"a nice testing notification"}}'; $notification = new Notification('test', 'a nice testing notification'); $message = new Message(); $message->setNotification($notification); $message->addRecipient(new Device('deviceId')); $this->assertSame( $body, json_encode($message) ); } }PK{Z~770php-firebase-cloud-messaging/tests/bootstrap.phpnu[fixture = new Notification('foo', 'bar'); } public function testJsonSerializeWithMinimalConfigurations() { $this->assertEquals(array('title' => 'foo', 'body' =>'bar'), $this->fixture->jsonSerialize()); } public function testJsonSerializeWithBadge() { $this->fixture->setBadge(1); $this->assertEquals(array('title' => 'foo', 'body' =>'bar', 'badge' => 1), $this->fixture->jsonSerialize()); } public function testJsonSerializeWithIcon() { $this->fixture->setIcon('name'); $this->assertEquals(array('title' => 'foo', 'body' =>'bar', 'icon' => 'name'), $this->fixture->jsonSerialize()); } public function testJsonSerializeWithContentAvailable() { $this->fixture->setContentAvailable(true); $this->assertEquals(array('title' => 'foo', 'body' =>'bar', 'content_available' => true), $this->fixture->jsonSerialize()); } } PK{ZU{1php-firebase-cloud-messaging/tests/ClientTest.phpnu[fixture = new Client(); } public function testSendConstruesValidJsonForNotificationWithTopic() { $apiKey = 'key'; $headers = array( 'Authorization' => sprintf('key=%s', $apiKey), 'Content-Type' => 'application/json' ); $guzzle = \Mockery::mock(\GuzzleHttp\Client::class); $guzzle->shouldReceive('post') ->once() ->with(Client::DEFAULT_API_URL, array('headers' => $headers, 'body' => '{"to":"\\/topics\\/test"}')) ->andReturn(\Mockery::mock(Response::class)); $this->fixture->injectGuzzleHttpClient($guzzle); $this->fixture->setApiKey($apiKey); $message = new Message(); $message->addRecipient(new Topic('test')); $this->fixture->send($message); } }PK{Z6Hphp-firebase-cloud-messaging/tests/PhpFirebaseCloudMessagingTestCase.phpnu[setApiKey($server_key); $client->injectGuzzleHttpClient(new \GuzzleHttp\Client()); $message = new Message(); $message->setPriority('high'); $message->addRecipient(new Device('_YOUR_DEVICE_TOKEN_')); $message ->setNotification(new Notification('some title', 'some body')) ->setData(['key' => 'value']) ; $response = $client->send($message); var_dump($response->getStatusCode()); var_dump($response->getBody()->getContents()); ``` #Send message to multiple Devices ``` ... $message = new Message(); $message->setPriority('high'); $message->addRecipient(new Device('_YOUR_DEVICE_TOKEN_')); $message->addRecipient(new Device('_YOUR_DEVICE_TOKEN_2_')); $message->addRecipient(new Device('_YOUR_DEVICE_TOKEN_3_')); $message ->setNotification(new Notification('some title', 'some body')) ->setData(['key' => 'value']) ; ... ``` #Send message to Topic ``` use sngrl\PhpFirebaseCloudMessaging\Client; use sngrl\PhpFirebaseCloudMessaging\Message; use sngrl\PhpFirebaseCloudMessaging\Recipient\Topic; use sngrl\PhpFirebaseCloudMessaging\Notification; $server_key = '_YOUR_SERVER_KEY_'; $client = new Client(); $client->setApiKey($server_key); $client->injectGuzzleHttpClient(new \GuzzleHttp\Client()); $message = new Message(); $message->setPriority('high'); $message->addRecipient(new Topic('_YOUR_TOPIC_')); $message ->setNotification(new Notification('some title', 'some body')) ->setData(['key' => 'value']) ; $response = $client->send($message); var_dump($response->getStatusCode()); var_dump($response->getBody()->getContents()); ``` #Send message to multiple Topics See Firebase documentation for sending to [combinations of multiple topics](https://firebase.google.com/docs/cloud-messaging/topic-messaging#sending_topic_messages_from_the_server). ``` ... $message = new Message(); $message->setPriority('high'); $message->addRecipient(new Topic('_YOUR_TOPIC_')); $message->addRecipient(new Topic('_YOUR_TOPIC_2_')); $message->addRecipient(new Topic('_YOUR_TOPIC_3_')); $message ->setNotification(new Notification('some title', 'some body')) ->setData(['key' => 'value']) // Will send to devices subscribed to topic 1 AND topic 2 or 3 ->setCondition('%s && (%s || %s)') ; ... ``` #Subscribe user to the topic ``` use sngrl\PhpFirebaseCloudMessaging\Client; $server_key = '_YOUR_SERVER_KEY_'; $client = new Client(); $client->setApiKey($server_key); $client->injectGuzzleHttpClient(new \GuzzleHttp\Client()); $response = $client->addTopicSubscription('_SOME_TOPIC_ID_', ['_FIRST_TOKEN_', '_SECOND_TOKEN_']); var_dump($response->getStatusCode()); var_dump($response->getBody()->getContents()); ``` #Remove user subscription to the topic ``` use sngrl\PhpFirebaseCloudMessaging\Client; $server_key = '_YOUR_SERVER_KEY_'; $client = new Client(); $client->setApiKey($server_key); $client->injectGuzzleHttpClient(new \GuzzleHttp\Client()); $response = $client->removeTopicSubscription('_SOME_TOPIC_ID_', ['_FIRST_TOKEN_', '_SECOND_TOKEN_']); var_dump($response->getStatusCode()); var_dump($response->getBody()->getContents()); ``` PK{Z%AA*php-firebase-cloud-messaging/composer.jsonnu[{ "name": "sngrl/php-firebase-cloud-messaging", "description": "PHP API for Firebase Cloud Messaging from Google", "license": "MIT", "keywords": ["PHP","FCM","Google","Firebase","Cloud","Notifications","Android","iOS","Chrome"], "homepage": "https://github.com/sngrl/php-firebase-cloud-messaging", "authors": [ { "name": "Sngrl", "email": "i@sngrl.ru" } ], "require": { "guzzlehttp/guzzle": "*", "php": ">=5.5" }, "require-dev": { "phpunit/phpunit": "*", "mockery/mockery" : "*" }, "autoload": { "psr-4": { "sngrl\\PhpFirebaseCloudMessaging\\": "src/" } }, "autoload-dev": { "psr-4": { "sngrl\\PhpFirebaseCloudMessaging\\Tests\\": "tests/" } } }PK{Z U++'php-firebase-cloud-messaging/.gitignorenu[vendor .project .buildpath .settings .idea PK{Zd 8php-firebase-cloud-messaging/src/Recipient/Recipient.phpnu[to = $to; return $this; } public function toJson() { return $this->to; } }PK{Zߘ©%%5php-firebase-cloud-messaging/src/Recipient/Device.phpnu[token = $token; return $this; } public function getToken() { return $this->token; } }PK{Z4php-firebase-cloud-messaging/src/Recipient/Topic.phpnu[name = $name; return $this; } public function getName() { return $this->name; } }PK{ZI//,php-firebase-cloud-messaging/src/Message.phpnu[jsonData = []; } /** * where should the message go * * @param Recipient $recipient * * @return \sngrl\PhpFirebaseCloudMessaging\Message */ public function addRecipient(Recipient $recipient) { $this->recipients[] = $recipient; if (!isset($this->recipientType)) { $this->recipientType = get_class($recipient); } if ($this->recipientType !== get_class($recipient)) { throw new \InvalidArgumentException('mixed recepient types are not supported by FCM'); } return $this; } public function setNotification(Notification $notification) { $this->notification = $notification; return $this; } public function setCollapseKey($collapseKey) { $this->collapseKey = $collapseKey; return $this; } public function setPriority($priority) { $this->priority = $priority; return $this; } public function setData(array $data) { $this->data = $data; return $this; } /** * Specify a condition pattern when sending to combinations of topics * https://firebase.google.com/docs/cloud-messaging/topic-messaging#sending_topic_messages_from_the_server * * Examples: * "%s && %s" > Send to devices subscribed to topic 1 and topic 2 * "%s && (%s || %s)" > Send to devices subscribed to topic 1 and topic 2 or 3 * * @param string $condition * @return $this */ public function setCondition($condition) { $this->condition = $condition; return $this; } /** * Set root message data via key * * @param string $key * @param mixed $value * @return $this */ public function setJsonKey($key, $value) { $this->jsonData[$key] = $value; return $this; } /** * Unset root message data via key * * @param string $key * @return $this */ public function unsetJsonKey($key) { unset($this->jsonData[$key]); return $this; } /** * Get root message data via key * * @param string $key * @return mixed */ public function getJsonKey($key) { return $this->jsonData[$key]; } /** * Get root message data * * @return array */ public function getJsonData() { return $this->jsonData; } /** * Set root message data * * @param array $array * @return $this */ public function setJsonData($array) { $this->jsonData = $array; return $this; } public function setDelayWhileIdle($value) { $this->setJsonKey('delay_while_idle', (bool)$value); return $this; } public function setTimeToLive($value) { $this->setJsonKey('time_to_live', (int)$value); return $this; } public function jsonSerialize() { $jsonData = $this->jsonData; if (empty($this->recipients)) { throw new \UnexpectedValueException('Message must have at least one recipient'); } if (count($this->recipients) == 1) { $jsonData['to'] = $this->createTarget(); } elseif ($this->recipientType == Device::class) { $jsonData['registration_ids'] = $this->createTarget(); } else { $jsonData['condition'] = $this->createTarget(); } if ($this->collapseKey) { $jsonData['collapse_key'] = $this->collapseKey; } if ($this->data) { $jsonData['data'] = $this->data; } if ($this->priority) { $jsonData['priority'] = $this->priority; } if ($this->notification) { $jsonData['notification'] = $this->notification; } return $jsonData; } private function createTarget() { $recipientCount = count($this->recipients); switch ($this->recipientType) { case Topic::class: if ($recipientCount == 1) { return sprintf('/topics/%s', current($this->recipients)->getName()); } else if ($recipientCount > self::MAX_TOPICS) { throw new \OutOfRangeException(sprintf('Message topic limit exceeded. Firebase supports a maximum of %u topics.', self::MAX_TOPICS)); } else if (!$this->condition) { throw new \InvalidArgumentException('Missing message condition. You must specify a condition pattern when sending to combinations of topics.'); } else if ($recipientCount != substr_count($this->condition, '%s')) { throw new \UnexpectedValueException('The number of message topics must match the number of occurrences of "%s" in the condition pattern.'); } else { $names = []; foreach ($this->recipients as $recipient) { $names[] = vsprintf("'%s' in topics", $recipient->getName()); } return vsprintf($this->condition, $names); } break; case Device::class: if ($recipientCount == 1) { return current($this->recipients)->getToken(); } else if ($recipientCount > self::MAX_DEVICES) { throw new \OutOfRangeException(sprintf('Message device limit exceeded. Firebase supports a maximum of %u devices.', self::MAX_DEVICES)); } else { $ids = []; foreach ($this->recipients as $recipient) { $ids[] = $recipient->getToken(); } return $ids; } break; default: break; } return null; } }PK{Z4php-firebase-cloud-messaging/src/ClientInterface.phpnu[title = $title; if ($body) $this->body = $body; parent::__construct(); } public function setTitle($title) { $this->title = $title; return $this; } public function setBody($body) { $this->body = $body; return $this; } /** * iOS only, will add smal red bubbles indicating the number of notifications to your apps icon * * @param integer $badge * @return $this */ public function setBadge($badge) { $this->badge = $badge; return $this; } /** * android only, set the name of your drawable resource as string * * @param string $icon * @return $this */ public function setIcon($icon) { $this->icon = $icon; return $this; } public function setClickAction($actionName) { $this->clickAction = $actionName; return $this; } public function setSound($sound) { $this->sound = $sound; return $this; } public function setTag($tag) { $this->tag = $tag; return $this; } public function setContentAvailable($content_available) { $this->content_available = $content_available; return $this; } public function jsonSerialize() { $jsonData = $this->getJsonData(); if ($this->title) { $jsonData['title'] = $this->title; } if ($this->body) { $jsonData['body'] = $this->body; } if ($this->badge) { $jsonData['badge'] = $this->badge; } if ($this->icon) { $jsonData['icon'] = $this->icon; } if ($this->clickAction) { $jsonData['click_action'] = $this->clickAction; } if ($this->sound) { $jsonData['sound'] = $this->sound; } if ($this->tag) { $jsonData['tag'] = $this->tag; } if ($this->content_available) { $jsonData['content_available'] = $this->content_available; } return $jsonData; } } PK{Z͜@@+php-firebase-cloud-messaging/src/Client.phpnu[guzzleClient = $client; } /** * add your server api key here * read how to obtain an api key here: https://firebase.google.com/docs/server/setup#prerequisites * * @param string $apiKey * * @return \sngrl\PhpFirebaseCloudMessaging\Client */ public function setApiKey($apiKey) { $this->apiKey = $apiKey; return $this; } /** * people can overwrite the api url with a proxy server url of their own * * @param string $url * * @return \sngrl\PhpFirebaseCloudMessaging\Client */ public function setProxyApiUrl($url) { $this->proxyApiUrl = $url; return $this; } /** * sends your notification to the google servers and returns a guzzle repsonse object * containing their answer. * * @param Message $message * * @return \Psr\Http\Message\ResponseInterface * @throws \GuzzleHttp\Exception\RequestException */ public function send(Message $message) { return $this->guzzleClient->post( $this->getApiUrl(), [ 'headers' => [ 'Authorization' => sprintf('key=%s', $this->apiKey), 'Content-Type' => 'application/json' ], 'body' => json_encode($message) ] ); } /** * @param integer $topic_id * @param array|string $recipients_tokens * * @return \Psr\Http\Message\ResponseInterface */ public function addTopicSubscription($topic_id, $recipients_tokens) { return $this->processTopicSubscription($topic_id, $recipients_tokens, self::DEFAULT_TOPIC_ADD_SUBSCRIPTION_API_URL); } /** * @param integer $topic_id * @param array|string $recipients_tokens * * @return \Psr\Http\Message\ResponseInterface */ public function removeTopicSubscription($topic_id, $recipients_tokens) { return $this->processTopicSubscription($topic_id, $recipients_tokens, self::DEFAULT_TOPIC_REMOVE_SUBSCRIPTION_API_URL); } /** * @param integer $topic_id * @param array|string $recipients_tokens * @param string $url * * @return \Psr\Http\Message\ResponseInterface */ protected function processTopicSubscription($topic_id, $recipients_tokens, $url) { if (!is_array($recipients_tokens)) $recipients_tokens = [$recipients_tokens]; return $this->guzzleClient->post( $url, [ 'headers' => [ 'Authorization' => sprintf('key=%s', $this->apiKey), 'Content-Type' => 'application/json' ], 'body' => json_encode([ 'to' => '/topics/' . $topic_id, 'registration_tokens' => $recipients_tokens, ]) ] ); } private function getApiUrl() { return isset($this->proxyApiUrl) ? $this->proxyApiUrl : self::DEFAULT_API_URL; } }PK{Z_00$php-firebase-cloud-messaging/LICENSEnu[PK{ZK*php-firebase-cloud-messaging/composer.locknu[PK{Z s-php-firebase-cloud-messaging/phpunit.xml.distnu[PK{Z|)G2php-firebase-cloud-messaging/tests/MessageTest.phpnu[PK{Z~770php-firebase-cloud-messaging/tests/bootstrap.phpnu[PK{Z;H7zphp-firebase-cloud-messaging/tests/NotificationTest.phpnu[PK{ZU{1php-firebase-cloud-messaging/tests/ClientTest.phpnu[PK{Z6Hphp-firebase-cloud-messaging/tests/PhpFirebaseCloudMessagingTestCase.phpnu[PK{ZT)&php-firebase-cloud-messaging/README.mdnu[PK{Z%AA*fphp-firebase-cloud-messaging/composer.jsonnu[PK{Z U++'php-firebase-cloud-messaging/.gitignorenu[PK{Zd 8php-firebase-cloud-messaging/src/Recipient/Recipient.phpnu[PK{Zߘ©%%5php-firebase-cloud-messaging/src/Recipient/Device.phpnu[PK{Z4tphp-firebase-cloud-messaging/src/Recipient/Topic.phpnu[PK{ZI//,php-firebase-cloud-messaging/src/Message.phpnu[PK{Z4php-firebase-cloud-messaging/src/ClientInterface.phpnu[PK{ZGOQ= = 1php-firebase-cloud-messaging/src/Notification.phpnu[PK{Z͜@@+U*php-firebase-cloud-messaging/src/Client.phpnu[PK8