Skip to content

Commit 9ff23e9

Browse files
committed
Remove framework-specific usage docs
The respective libraries include it already
1 parent a7495c3 commit 9ff23e9

9 files changed

Lines changed: 20 additions & 263 deletions

docs/app-check.rst

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,9 @@ Before you start, please read about Firebase App Check in the official documenta
1414
Initializing the App Check component
1515
************************************
1616

17-
.. tab-set::
18-
19-
.. tab-item:: SDK
20-
21-
.. code-block:: php
22-
23-
$appCheck = $factory->createAppCheck();
24-
25-
.. tab-item:: Symfony
26-
27-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
28-
29-
.. code-block:: php
30-
31-
use Kreait\Firebase\Contract\AppCheck;
32-
33-
class MyService
34-
{
35-
public function __construct(AppCheck $appCheck)
36-
{
37-
$this->appCheck = $appCheck;
38-
}
39-
}
40-
41-
.. tab-item:: Laravel
42-
43-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
44-
45-
.. code-block:: php
46-
47-
$appCheck = app('firebase.app_check');
17+
.. code-block:: php
4818
19+
$appCheck = $factory->createAppCheck();
4920
5021
.. _verify-app-check-tokens:
5122

docs/authentication.rst

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,9 @@ limited by that rule.
3333
Initializing the Auth component
3434
*******************************
3535

36-
.. tab-set::
37-
38-
.. tab-item:: SDK
39-
40-
.. code-block:: php
41-
42-
$auth = $factory->createAuth();
43-
44-
.. tab-item:: Symfony
45-
46-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
47-
48-
.. code-block:: php
49-
50-
use Kreait\Firebase\Contract\Auth;
51-
52-
class MyService
53-
{
54-
public function __construct(Auth $auth)
55-
{
56-
$this->auth = $auth;
57-
}
58-
}
59-
60-
.. tab-item:: Laravel
61-
62-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
63-
64-
.. code-block:: php
65-
66-
$auth = app('firebase.auth');
36+
.. code-block:: php
6737
38+
$auth = $factory->createAuth();
6839
6940
.. _create-custom-tokens:
7041

docs/cloud-firestore.rst

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,9 @@ Before you start, please read about Firestore in the official documentation:
2929
Initializing the Firestore component
3030
************************************
3131

32-
.. tab-set::
33-
34-
.. tab-item:: SDK
35-
36-
.. code-block:: php
37-
38-
$firestore = $factory->createFirestore();
39-
40-
.. tab-item:: Symfony
41-
42-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
43-
44-
.. code-block:: php
45-
46-
use Kreait\Firebase\Contract\Firestore;
47-
48-
class MyService
49-
{
50-
public function __construct(Firestore $firestore)
51-
{
52-
$this->firestore = $firestore;
53-
}
54-
}
55-
56-
.. tab-item:: Laravel
57-
58-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
59-
60-
.. code-block:: php
32+
.. code-block:: php
6133
62-
$firestore = app('firebase.firestore');
34+
$firestore = $factory->createFirestore();
6335
6436
***************
6537
Getting started

docs/cloud-messaging.rst

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,9 @@ Before you start, please read about Firebase Cloud Messaging in the official doc
1818
Initializing the Messaging component
1919
************************************
2020

21-
.. tab-set::
22-
23-
.. tab-item:: SDK
24-
25-
.. code-block:: php
26-
27-
$messaging = $factory->createMessaging();
28-
29-
.. tab-item:: Symfony
30-
31-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
32-
33-
.. code-block:: php
34-
35-
use Kreait\Firebase\Contract\Messaging;
36-
37-
class MyService
38-
{
39-
public function __construct(Messaging $messaging)
40-
{
41-
$this->messaging = $messaging;
42-
}
43-
}
44-
45-
.. tab-item:: Laravel
46-
47-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
48-
49-
.. code-block:: php
21+
.. code-block:: php
5022
51-
$messaging = app('firebase.messaging');
23+
$messaging = $factory->createMessaging();
5224
5325
***************
5426
Getting started

docs/cloud-storage.rst

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,9 @@ Before you start, please read about Firebase Cloud Storage in the official docum
1919
Initializing the Storage component
2020
**********************************
2121

22-
.. tab-set::
23-
24-
.. tab-item:: SDK
25-
26-
.. code-block:: php
27-
28-
$storage = $factory->createStorage();
29-
30-
.. tab-item:: Symfony
31-
32-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
33-
34-
.. code-block:: php
35-
36-
use Kreait\Firebase\Contract\Storage;
37-
38-
class MyService
39-
{
40-
public function __construct(Storage $storage)
41-
{
42-
$this->storage = $storage;
43-
}
44-
}
45-
46-
.. tab-item:: Laravel
47-
48-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
49-
50-
.. code-block:: php
51-
52-
$storage = app('firebase.storage');
22+
.. code-block:: php
5323
24+
$storage = $factory->createStorage();
5425
5526
***************
5627
Getting started

docs/dynamic-links.rst

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,41 +37,10 @@ Getting started
3737
Initializing the Dynamic Links component
3838
****************************************
3939

40-
.. tab-set::
41-
42-
.. tab-item:: SDK
43-
44-
.. code-block:: php
45-
46-
$dynamicLinksDomain = 'https://example.page.link';
47-
$dynamicLinks = $factory->createDynamicLinksService($dynamicLinksDomain);
48-
49-
.. tab-item:: Symfony
50-
51-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
52-
53-
.. code-block:: php
54-
55-
use Kreait\Firebase\Contract\DynamicLinks;
56-
57-
class MyService
58-
{
59-
public function __construct(DynamicLinks $dynamicLinks)
60-
{
61-
$this->dynamicLinks = $dynamicLinks;
62-
}
63-
}
64-
65-
.. tab-item:: Laravel
66-
67-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
68-
69-
To define the default Dynamic Links Domain, configure the ``FIREBASE_DYNAMIC_LINKS_DEFAULT_DOMAIN`` environment variable.
70-
71-
.. code-block:: php
72-
73-
$dynamicLinks = app('firebase.dynamic_links');
40+
.. code-block:: php
7441
42+
$dynamicLinksDomain = 'https://example.page.link';
43+
$dynamicLinks = $factory->createDynamicLinksService($dynamicLinksDomain);
7544
7645
*********************
7746
Create a Dynamic Link

docs/realtime-database.rst

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,9 @@ Realtime Database
99
Initializing the Realtime Database component
1010
********************************************
1111

12-
.. tab-set::
13-
14-
.. tab-item:: SDK
15-
16-
.. code-block:: php
17-
18-
$database = $factory->createDatabase();
19-
20-
.. tab-item:: Symfony
21-
22-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
23-
24-
.. code-block:: php
25-
26-
use Kreait\Firebase\Contract\Database;
27-
28-
class MyService
29-
{
30-
public function __construct(Database $database)
31-
{
32-
$this->database = $database;
33-
}
34-
}
35-
36-
.. tab-item:: Laravel
37-
38-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
39-
40-
.. code-block:: php
41-
42-
$database = app('firebase.database');
12+
.. code-block:: php
4313
14+
$database = $factory->createDatabase();
4415
4516
***************
4617
Retrieving data

docs/remote-config.rst

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,9 @@ For Firebase projects created before the March 7, 2018 release of the Remote Con
2626
Initializing the Remote Config component
2727
*****************************************
2828

29-
.. tab-set::
30-
31-
.. tab-item:: SDK
32-
33-
.. code-block:: php
34-
35-
$remoteConfig = $factory->createRemoteConfig();
36-
37-
.. tab-item:: Symfony
38-
39-
See the `Symfony Bundle documentation <https://github.com/kreait/firebase-bundle>`_ for configuration details.
40-
41-
.. code-block:: php
42-
43-
use Kreait\Firebase\Contract\RemoteConfig;
44-
45-
class MyService
46-
{
47-
public function __construct(RemoteConfig $remoteConfig)
48-
{
49-
$this->remoteConfig = $remoteConfig;
50-
}
51-
}
52-
53-
.. tab-item:: Laravel
54-
55-
See the `Laravel Package documentation <https://github.com/kreait/laravel-firebase>`_ for configuration details.
56-
57-
.. code-block:: php
29+
.. code-block:: php
5830
59-
$remoteConfig = app('firebase.remote_config');
31+
$remoteConfig = $factory->createRemoteConfig();
6032
6133
*********************
6234
Get the Remote Config

docs/setup.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,11 @@ the factory directly. To generate a private key file for your service account:
3737

3838
You can then configure the SDK to use this Service Account:
3939

40-
.. tab-set::
41-
42-
.. tab-item:: SDK
43-
44-
.. code-block:: php
45-
46-
use Kreait\Firebase\Factory;
47-
48-
$factory = (new Factory)->withServiceAccount('/path/to/firebase_credentials.json');
49-
50-
.. tab-item:: Symfony
51-
52-
See the `Symfony configuration documentation <https://github.com/kreait/firebase-bundle#configuration>`_ for setup details.
40+
.. code-block:: php
5341
54-
.. tab-item:: Laravel
42+
use Kreait\Firebase\Factory;
5543
56-
See the `Laravel configuration documentation <https://github.com/kreait/laravel-firebase#configuration>`_ for setup details.
44+
$factory = (new Factory)->withServiceAccount('/path/to/firebase_credentials.json');
5745
5846
**********
5947
Project ID

0 commit comments

Comments
 (0)