Skip to content

Commit f0dd79f

Browse files
committed
Replace apiargs for functions
1 parent 01a8a44 commit f0dd79f

6 files changed

+61
-59
lines changed

docs/includes/apiargs-function-add_logger-param.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/includes/apiargs-function-remove_logger-param.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/includes/apiargs-function-with_transaction-param.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/reference/function/add_logger.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,24 @@ Definition
2323

2424
function add_logger(Psr\Log\LoggerInterface $logger): void
2525

26-
This method has the following parameters:
26+
Parameters
27+
----------
28+
29+
This function has the following parameters:
30+
31+
.. list-table::
32+
:header-rows: 1
33+
:widths: 20 20 80
34+
35+
* - Name
36+
- Type
37+
- Description
38+
39+
* - $logger
40+
- Psr\\Log\\LoggerInterface
41+
- A logger to register.
2742

28-
.. include:: /includes/apiargs/function-add_logger-param.rst
43+
If the logger is already registered, the method will have no effect.
2944

3045
Behavior
3146
--------

docs/reference/function/remove_logger.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,24 @@ Definition
2323

2424
function remove_logger(Psr\Log\LoggerInterface $logger): void
2525

26-
This method has the following parameters:
26+
Parameters
27+
----------
28+
29+
This function has the following parameters:
30+
31+
.. list-table::
32+
:header-rows: 1
33+
:widths: 20 20 80
34+
35+
* - Name
36+
- Type
37+
- Description
38+
39+
* - $logger
40+
- Psr\\Log\\LoggerInterface
41+
- A logger to unregister.
2742

28-
.. include:: /includes/apiargs/function-remove_logger-param.rst
43+
If the logger is not registered, the method will have no effect.
2944

3045
Errors/Exceptions
3146
-----------------

docs/reference/function/with_transaction.txt

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,34 @@ Definition
2323

2424
function with_transaction(MongoDB\Driver\Session $session, callable $callback, array $transactionOptions = []): void
2525

26-
This method has the following parameters:
26+
Parameters
27+
----------
28+
29+
This function has the following parameters:
30+
31+
.. list-table::
32+
:header-rows: 1
33+
:widths: 20 20 80
34+
35+
* - Name
36+
- Type
37+
- Description
38+
39+
* - $session
40+
- :php:`MongoDB\\Driver\\Session <mongodb-driver-session>`
41+
- A client session used to execute the transaction.
42+
43+
* - $callback
44+
- :php:`callable <language.types.callable>`
45+
- A callback that will be run inside the transaction. The callback must
46+
accept a :php:`MongoDB\\Driver\\Session <mongodb-driver-session>` object
47+
as first argument.
2748

28-
.. include:: /includes/apiargs/function-with_transaction-param.rst
49+
* - $transactionOptions
50+
- array
51+
- Transaction options, which will be passed to
52+
:php:`MongoDB\\Driver\\Session::startTransaction <mongodb-driver-session.starttransaction>`.
53+
See the extension documentation for a list of supported options.
2954

3055
Behavior
3156
--------

0 commit comments

Comments
 (0)