Download the PHP package eelkevdbos/firebase-php without Composer
On this page you can find all versions of the php package eelkevdbos/firebase-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eelkevdbos/firebase-php
More information about eelkevdbos/firebase-php
Files in eelkevdbos/firebase-php
Package firebase-php
Short Description Firebase php wrapper for REST API
License MIT
Informations about the package firebase-php
firebase-php
Firebase php wrapper for REST API
Prerequisites
- PHP >= 5.4
- Firebase >= 1.1.1
- Composer (recommended, not required)
Installation using composer (recommended)
Set your projects minimum stability to dev
in composer.json
. This is caused by the PHP-JWT dependency. After updating the composer.json file, simply execute: composer require eelkevdbos/firebase-php dev-master
Installation without composer
For a vanilla install, the following dependencies should be downloaded:
Loading the dependencies can be achieved by using any PSR-4 autoloader.
Basic Usage
By setting your firebase secret as token, you gain superuser access to firebase.
Advanced Usage
For more finegrained authentication, have a look at the security rules. Using the token generator allows you to make use of the authentication services supplied by Firebase.
The above snippet of php interacts with the following security rules:
And will allow the snippet read-access to all of the nodes, but not write-access.
Concurrent requests
Execution of concurrent requests can be achieved with the same syntax as regular requests. Simply wrap them in a Closure and call the closure via the batch
method and you are all set.
Integration
At the moment of writing, integration for Laravel 4.* is supported. A service provider and a facade class are supplied. Installation is done in 2 simple steps after the general installation steps:
-
edit
app/config/app.php
to add the service provider and the facade class - edit
app/config/services.php
(supplied by default from L4.2) to addtoken
andbase_url
settings
Eventing
The library supports the EventEmitter pattern. The event-emitter is attached to the Firebase class. Events currently available:
- RequestsBatchedEvent
All versions of firebase-php with dependencies
firebase/php-jwt Version ~2.0
guzzlehttp/guzzle Version 5.*
illuminate/support Version >=4.0