Download the PHP package ethinking/push-api without Composer
On this page you can find all versions of the php package ethinking/push-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package push-api
== Push API
Push.Delivery service wrapper which makes it possible to send Push Notifications via various channels to many subscribers and in high speed
=== Installation
The easiest and recommended way to install this utility is as a composer package:
[source,php]
composer require ethinking/push-api dev-master
=== Usage
Add to your root routes.yaml the next code:
[source,yaml]
push_api_service_worker: path: /service-worker.js controller: Ethinking\EthinkingPushApiBundle\Controller\ServiceWorkerController::indexAction
push_api_web_push: path: /webpush.js controller: Ethinking\EthinkingPushApiBundle\Controller\WebPushController::indexAction
Add to your services.yaml the next code:
[source,yaml]
Ethinking\EthinkingPushApiBundle\Service\PushApiService: arguments:
- '@Symfony\Contracts\HttpClient\HttpClientInterface'
- '@logger'
-
'@Symfony\Contracts\Cache\CacheInterface'
Initialize in your class:
[source,php]
use Ethinking\EthinkingPushApiBundle\Service\PushApiService; use Ethinking\EthinkingPushApiBundle\Entity\Settings;
public function __construct(PushApiService $pushApiService) { settings = new Settings( $this->getSettingsId(), $this->getDomain(), $this->getUsername(), $this->getPassword(), $this->getClientId() );
$pushApiService->setSettings($settings);
}
Update assets
[source,php]
yarn encore dev
Clear cache
[source,php]
php bin/console c:c
=== Dependencies
[source,json]
{ "symfony/dependency-injection": "^5.0", "symfony/http-kernel": "^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/http-client": "^4.3|^5.0", "symfony/http-client-contracts": "^1.1.8|^2", "symfony/validator": "^3.4.30|^4.3.3|^5.0", "symfony/mime": "^4.3|^5.0" }
All versions of push-api with dependencies
symfony/dependency-injection Version ^5.0
symfony/http-kernel Version ^5.0
symfony/http-foundation Version ^4.4|^5.0
symfony/http-client Version ^4.3|^5.0
symfony/http-client-contracts Version ^1.1.8|^2
symfony/validator Version ^3.4.30|^4.3.3|^5.0
symfony/mime Version ^4.3|^5.0