@@ -38,7 +38,7 @@ database from the :atlas:`Atlas sample datasets </sample-data>`. To access this
38
38
from your PHP application, instantiate a ``MongoDB\Client`` that connects to an Atlas cluster
39
39
and assign the following value to your ``$collection`` variable:
40
40
41
- .. literalinclude:: /includes/read/change- streams.php
41
+ .. literalinclude:: /includes/read/change/ streams/change-stream .php
42
42
:language: php
43
43
:dedent:
44
44
:start-after: start-db-coll
@@ -53,7 +53,7 @@ Some examples use the ``toJSON()`` function to represent change events, which ar
53
53
documents, as Extended JSON. To use this function, paste the following code into your
54
54
application file:
55
55
56
- .. literalinclude:: /includes/read/change-streams.php
56
+ .. literalinclude:: /includes/read/change-streams/change-stream .php
57
57
:language: php
58
58
:dedent:
59
59
:start-after: start-to-json
@@ -74,7 +74,7 @@ classes:
74
74
The following example opens a change stream on the ``restaurants`` collection
75
75
and outputs changes as they occur:
76
76
77
- .. literalinclude:: /includes/read/change-streams.php
77
+ .. literalinclude:: /includes/read/change-streams/change-stream .php
78
78
:start-after: start-open-change-stream
79
79
:end-before: end-open-change-stream
80
80
:language: php
@@ -86,7 +86,7 @@ a document that has a ``name`` field value of ``'Blarney Castle'``:
86
86
87
87
.. _php-change-stream-update:
88
88
89
- .. literalinclude:: /includes/read/change-streams.php
89
+ .. literalinclude:: /includes/read/change-streams/change-stream .php
90
90
:start-after: start-update-for-change-stream
91
91
:end-before: end-update-for-change-stream
92
92
:language: php
@@ -123,7 +123,7 @@ The following example passes a pipeline that includes the ``$match`` stage to th
123
123
``watch()`` method. This instructs the ``watch()`` method to output events only
124
124
when update operations occur:
125
125
126
- .. literalinclude:: /includes/read/change-streams.php
126
+ .. literalinclude:: /includes/read/change-streams/change-stream-pipeline .php
127
127
:start-after: start-change-stream-pipeline
128
128
:end-before: end-change-stream-pipeline
129
129
:language: php
@@ -223,7 +223,7 @@ one of the following values:
223
223
The following example calls the ``watch()`` method on a collection and includes the post-image
224
224
of updated documents by setting the ``fullDocument`` option:
225
225
226
- .. literalinclude:: /includes/read/change-streams.php
226
+ .. literalinclude:: /includes/read/change-streams/change-stream-options .php
227
227
:start-after: start-change-stream-post-image
228
228
:end-before: end-change-stream-post-image
229
229
:language: php
0 commit comments