-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20242c6
commit 90c3768
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
############# | ||
Configuration | ||
############# | ||
|
||
.. code-block:: php | ||
use Kreait\Firebase\Configuration; | ||
use Kreait\Firebase\Firebase; | ||
$config = new Configuration(); | ||
$firebase = new Firebase('https://my-app.firebaseio.com', $config); | ||
******* | ||
Logging | ||
******* | ||
|
||
Any `PSR-3 compliant logger <https://packagist.org/providers/psr/log-implementation>`_ | ||
can be used for logging. The following example uses | ||
`Monolog <https://github.com/Seldaek/monolog>`_: | ||
|
||
.. code-block:: php | ||
use Monolog\Logger; | ||
use Monolog\Handler\StreamHandler; | ||
$logger = new Logger('firebase-php'); | ||
$logger->pushHandler(new StreamHandler('path/to/your.log', Logger::DEBUG)); | ||
$config->setLogger($logger); | ||
******************* | ||
Custom HTTP Adapter | ||
******************* | ||
|
||
By default, the library tries to find an already existing instance of an | ||
HTTP adapter, and if none is found, it will create a new one. You can | ||
override the used HTTP adapter by setting it in the configuration like this: | ||
|
||
.. code-block:: php | ||
use Ivory\HttpAdapter\FopenHttpAdapter; | ||
$http = new FopenHttpAdapter(); // or any other available adapter | ||
$config->setHttpAdapter($http); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,5 @@ User Guide | |
authentication | ||
retrieving-data | ||
writing-data | ||
configuration | ||
about |