From 7df91dc7326d8e70d4c65a6ad549d5cdb21c06ca Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 12 Nov 2024 15:16:54 +0000 Subject: [PATCH 1/7] PHP 8.4: Document SplObjectStorage::seek() --- reference/spl/splobjectstorage/seek.xml | 134 ++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 reference/spl/splobjectstorage/seek.xml diff --git a/reference/spl/splobjectstorage/seek.xml b/reference/spl/splobjectstorage/seek.xml new file mode 100644 index 000000000000..ad451917f66d --- /dev/null +++ b/reference/spl/splobjectstorage/seek.xml @@ -0,0 +1,134 @@ + + + + SplObjectStorage::seek + Description + + + + &reftitle.description; + + public voidSplObjectStorage::seek + intoffset + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + + + + offset + + + Description. + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>SplObjectStorage::seek</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + something appendix + + + + + From 35497639ef258bcf1d3d3eeace3afa1e0d04ff54 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 12 Nov 2024 15:18:48 +0000 Subject: [PATCH 2/7] Add info in versions.xml --- reference/spl/versions.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/spl/versions.xml b/reference/spl/versions.xml index 9468a4f10848..916e02d852c4 100644 --- a/reference/spl/versions.xml +++ b/reference/spl/versions.xml @@ -979,6 +979,7 @@ + From 42b203441d28169446f69c499741250f52be6bee Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:31:26 +0100 Subject: [PATCH 3/7] Document SplObjectStorage::seek() --- reference/spl/splobjectstorage/seek.xml | 76 ++++++++++--------------- 1 file changed, 31 insertions(+), 45 deletions(-) diff --git a/reference/spl/splobjectstorage/seek.xml b/reference/spl/splobjectstorage/seek.xml index ad451917f66d..f86e5c551b81 100644 --- a/reference/spl/splobjectstorage/seek.xml +++ b/reference/spl/splobjectstorage/seek.xml @@ -2,7 +2,7 @@ SplObjectStorage::seek - Description + Seeks iterator to a position @@ -11,26 +11,26 @@ public voidSplObjectStorage::seek intoffset - &warn.undocumented.func; + - Description. + Seeks to a given position in the iterator. &reftitle.parameters; - + offset - Description. + The position to seek to. - + @@ -43,71 +43,57 @@ &reftitle.errors; - When does this function issue E_* level errors, - and/or throw Exceptions. + Throws an OutOfBoundsException + if the offset is not seekable. - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; <methodname>SplObjectStorage::seek</methodname> example - Description. + Seeks to item position 2 in the iterator. seek(2); +var_dump($storage->key()); +var_dump($storage->current()); ?> ]]> &example.outputs; + string(1) "c" +} ]]> - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - &reftitle.seealso; - ClassName::otherMethodName - some_function - something appendix + SeekableIterator From 5a9c684602cd984e9d026de4ee1b6fdf4fd4a389 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:31:39 +0100 Subject: [PATCH 4/7] Change para to simpara in errors of SeekableIterator::seek() --- reference/spl/seekableiterator/seek.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/spl/seekableiterator/seek.xml b/reference/spl/seekableiterator/seek.xml index 2bc98ed188e4..2469f2ca1e60 100644 --- a/reference/spl/seekableiterator/seek.xml +++ b/reference/spl/seekableiterator/seek.xml @@ -43,10 +43,10 @@ &reftitle.errors; - + Implementations should throw an OutOfBoundsException if the offset is not seekable. - + From 465c1de7254e56e9648698f317e5af4f5df9dff5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:31:49 +0100 Subject: [PATCH 5/7] Document ArrayIterator::seek() --- reference/spl/arrayiterator/seek.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/reference/spl/arrayiterator/seek.xml b/reference/spl/arrayiterator/seek.xml index b356c24dbe38..9d6eb17df89f 100644 --- a/reference/spl/arrayiterator/seek.xml +++ b/reference/spl/arrayiterator/seek.xml @@ -3,7 +3,7 @@ ArrayIterator::seek - Seek to position + Seeks to a position @@ -13,7 +13,9 @@ intoffset - &warn.undocumented.func; + + Seeks to a given position in the iterator. + @@ -32,6 +34,14 @@ + + &reftitle.errors; + + Throws an OutOfBoundsException + if the offset is not seekable. + + + &reftitle.returnvalues; From 62259b160d8783563a723c5d556c4329c89f9e2d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:33:09 +0100 Subject: [PATCH 6/7] fix --- reference/spl/arrayiterator/seek.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reference/spl/arrayiterator/seek.xml b/reference/spl/arrayiterator/seek.xml index 9d6eb17df89f..67914a502f8a 100644 --- a/reference/spl/arrayiterator/seek.xml +++ b/reference/spl/arrayiterator/seek.xml @@ -34,6 +34,13 @@ + + &reftitle.returnvalues; + + &return.void; + + + &reftitle.errors; @@ -42,13 +49,6 @@ - - &reftitle.returnvalues; - - &return.void; - - -