@@ -38,7 +38,7 @@ database from the :atlas:`Atlas sample datasets </sample-data>`. To access this
3838from your PHP application, instantiate a ``MongoDB\Client`` that connects to an Atlas cluster
3939and assign the following value to your ``$collection`` variable:
4040
41- .. literalinclude:: /includes/read/change- streams.php
41+ .. literalinclude:: /includes/read/change/ streams/change-stream .php
4242 :language: php
4343 :dedent:
4444 :start-after: start-db-coll
@@ -53,7 +53,7 @@ Some examples use the ``toJSON()`` function to represent change events, which ar
5353documents, as Extended JSON. To use this function, paste the following code into your
5454application file:
5555
56- .. literalinclude:: /includes/read/change-streams.php
56+ .. literalinclude:: /includes/read/change-streams/change-stream .php
5757 :language: php
5858 :dedent:
5959 :start-after: start-to-json
@@ -74,7 +74,7 @@ classes:
7474The following example opens a change stream on the ``restaurants`` collection
7575and outputs changes as they occur:
7676
77- .. literalinclude:: /includes/read/change-streams.php
77+ .. literalinclude:: /includes/read/change-streams/change-stream .php
7878 :start-after: start-open-change-stream
7979 :end-before: end-open-change-stream
8080 :language: php
@@ -86,7 +86,7 @@ a document that has a ``name`` field value of ``'Blarney Castle'``:
8686
8787.. _php-change-stream-update:
8888
89- .. literalinclude:: /includes/read/change-streams.php
89+ .. literalinclude:: /includes/read/change-streams/change-stream .php
9090 :start-after: start-update-for-change-stream
9191 :end-before: end-update-for-change-stream
9292 :language: php
@@ -123,7 +123,7 @@ The following example passes a pipeline that includes the ``$match`` stage to th
123123``watch()`` method. This instructs the ``watch()`` method to output events only
124124when update operations occur:
125125
126- .. literalinclude:: /includes/read/change-streams.php
126+ .. literalinclude:: /includes/read/change-streams/change-stream-pipeline .php
127127 :start-after: start-change-stream-pipeline
128128 :end-before: end-change-stream-pipeline
129129 :language: php
@@ -223,7 +223,7 @@ one of the following values:
223223The following example calls the ``watch()`` method on a collection and includes the post-image
224224of updated documents by setting the ``fullDocument`` option:
225225
226- .. literalinclude:: /includes/read/change-streams.php
226+ .. literalinclude:: /includes/read/change-streams/change-stream-options .php
227227 :start-after: start-change-stream-post-image
228228 :end-before: end-change-stream-post-image
229229 :language: php
0 commit comments