From 681b7c83099b289c36ec346648210fc72c2e2df0 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 10 Dec 2024 14:30:24 +0000 Subject: [PATCH 1/5] Integrate SPL language-snippets They are only used once, having them as entities is useless. --- language-snippets.ent | 26 ---------------------- reference/spl/datastructures.xml | 10 ++------- reference/spl/exceptions.xml | 19 ++++++++++------ reference/spl/files.xml | 12 +++++----- reference/spl/interfaces.xml | 38 ++++++++++++++++---------------- reference/spl/iterators.xml | 18 +++++---------- reference/spl/miscellaneous.xml | 13 ++++++----- 7 files changed, 52 insertions(+), 84 deletions(-) diff --git a/language-snippets.ent b/language-snippets.ent index 5de28b3137d5..26bb4819a0ed 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -2721,32 +2721,6 @@ to be references, then they must be references in the passed argument list.'> '> - -Datastructures'> - -Exceptions'> - - SPL provides a set of standard Exceptions. - - - See also the . - -'> - -File Handling'> -SPL provides a number of classes to work with files.'> - -Interfaces'> -SPL provides a set of interfaces.See also the '> -Interface list'> - -Iterators'> -SPL provides a set of iterators to traverse over objects.'> - -Miscellaneous Classes and Interfaces'> -Classes and interfaces which do not fit into the other SPL categories.'> - For maximum portability, it is recommended to always use forward slashes (/) as directory separator in ZIP filenames.'> diff --git a/reference/spl/datastructures.xml b/reference/spl/datastructures.xml index bc7a1d16f414..31bab88f4e7a 100644 --- a/reference/spl/datastructures.xml +++ b/reference/spl/datastructures.xml @@ -1,9 +1,7 @@ - - - - &spl.datastructures.intro.title; + + Datastructures @@ -103,9 +101,6 @@ &reference.spl.splobjectstorage; - - - - diff --git a/reference/spl/exceptions.xml b/reference/spl/exceptions.xml index c7dbee016c63..3f1de3fb4264 100644 --- a/reference/spl/exceptions.xml +++ b/reference/spl/exceptions.xml @@ -1,12 +1,12 @@ - - - - &spl.exceptions.intro.title; + + Exceptions - &spl.exceptions.intro; + + SPL provides a set of standard Exceptions. +
SPL Exceptions Class Tree @@ -39,6 +39,13 @@
+
+ &reftitle.seealso; + + + +
+
&reference.spl.badfunctioncallexception; @@ -56,7 +63,6 @@ &reference.spl.unexpectedvalueexception;
- - diff --git a/reference/spl/files.xml b/reference/spl/files.xml index bf70ab641a9d..f72aa764d057 100644 --- a/reference/spl/files.xml +++ b/reference/spl/files.xml @@ -1,17 +1,19 @@ + + File Handling - - - &spl.files.intro.title; - &spl.files.intro; + + + SPL provides a number of classes to work with files. + + &reference.spl.splfileinfo; &reference.spl.splfileobject; &reference.spl.spltempfileobject; - - - - - &spl.interfaces.intro.title; + + Interfaces - &spl.interfaces.intro; + + SPL provides a set of interfaces. +
- &spl.interfaces.list; + Interface list + + + OuterIterator + RecursiveIterator + SeekableIterator + SplObserver + SplSubject + +
+ +
+ &reftitle.seealso; - OuterIterator - RecursiveIterator - SeekableIterator - SplObserver - SplSubject +
@@ -24,15 +32,8 @@ &reference.spl.outeriterator; &reference.spl.recursiveiterator; &reference.spl.seekableiterator; -
- - - - diff --git a/reference/spl/iterators.xml b/reference/spl/iterators.xml index 25a4665fa6cd..368ea9b646e2 100644 --- a/reference/spl/iterators.xml +++ b/reference/spl/iterators.xml @@ -1,12 +1,12 @@ - - - - &spl.iterators.intro.title; + + Iterators - &spl.iterators.intro; + + SPL provides a set of iterators to traverse over objects. +
SPL Iterators Class Tree @@ -114,10 +114,6 @@ - - &reference.spl.appenditerator; &reference.spl.arrayiterator; &reference.spl.cachingiterator; @@ -144,9 +140,6 @@ &reference.spl.regexiterator; - - - - diff --git a/reference/spl/miscellaneous.xml b/reference/spl/miscellaneous.xml index 1a2855c115aa..f8870ef2214e 100644 --- a/reference/spl/miscellaneous.xml +++ b/reference/spl/miscellaneous.xml @@ -1,17 +1,19 @@ + + Miscellaneous Classes and Interfaces - - - &spl.misc.intro.title; - &spl.misc.intro; + + + Classes and interfaces which do not fit into the other SPL categories. + + &reference.spl.arrayobject; &reference.spl.splobserver; &reference.spl.splsubject; - - From b50fadf5cb6b608d6a87f5822f94f20c9ad6d20c Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 10 Dec 2024 18:09:02 +0000 Subject: [PATCH 2/5] Move SPL interfaces from misc to interface page --- reference/spl/interfaces.xml | 5 ++++- reference/spl/miscellaneous.xml | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/spl/interfaces.xml b/reference/spl/interfaces.xml index 375161a592b6..e5a8d47b8fc5 100644 --- a/reference/spl/interfaces.xml +++ b/reference/spl/interfaces.xml @@ -5,7 +5,8 @@ - SPL provides a set of interfaces. + SPL provides a set of interfaces to enhance iterators, + and a pair of interfaces to implement the Observer Design Pattern.
@@ -32,6 +33,8 @@ &reference.spl.outeriterator; &reference.spl.recursiveiterator; &reference.spl.seekableiterator; + &reference.spl.splobserver; + &reference.spl.splsubject; - - + Standard PHP Library (SPL) SPL - + &reftitle.intro; - - The Standard PHP Library (SPL) is a collection of interfaces and classes that are meant to solve - common problems. - - - SPL provides a set of standard datastructure, a set of iterators to traverse over objects, a set of interfaces, a set of standard Exceptions, a number of classes to work with files and it provides a set of functions like spl_autoload_register - + + The Standard PHP Library (SPL) extension defines interfaces and classes + that are meant to solve common problems. + + + The extension provides various datastructures, generic exceptions, + iterators, classes to work with filesystems using an object + orientated API, and utility functions. + - &reference.spl.datastructures; - &reference.spl.iterators; &reference.spl.interfaces; + &reference.spl.datastructures; &reference.spl.exceptions; - &reference.spl.reference; + &reference.spl.iterators; &reference.spl.files; - &reference.spl.miscellaneous; - - + &reference.spl.reference; - - diff --git a/reference/spl/datastructures.xml b/reference/spl/datastructures.xml index 31bab88f4e7a..748f4824ffed 100644 --- a/reference/spl/datastructures.xml +++ b/reference/spl/datastructures.xml @@ -59,10 +59,17 @@ Arrays - Arrays are structures that store the data in a continuous way, accessible - via indexes. Don't confuse them with PHP arrays: PHP arrays are in fact - implemented as ordered hashtables. + Arrays are structures that store the data in a contiguous way, + accessible via indexes. + + + Do not confuse this with PHP's native array type. + PHP arrays are in reality ordered hashtables. + However, SPL provides the ArrayObject class + to wrap PHP arrays into an object. + + @@ -98,6 +105,8 @@ &reference.spl.splpriorityqueue; &reference.spl.splfixedarray; + &reference.spl.arrayobject; + &reference.spl.splobjectstorage; diff --git a/reference/spl/miscellaneous.xml b/reference/spl/miscellaneous.xml deleted file mode 100644 index c216ceb84140..000000000000 --- a/reference/spl/miscellaneous.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - Miscellaneous Classes and Interfaces - - - - Classes and interfaces which do not fit into the other SPL categories. - - - - &reference.spl.arrayobject; - - - From e07e84bd36627d64d148d0be1217cf069a1427b2 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 10 Dec 2024 18:38:23 +0000 Subject: [PATCH 4/5] Remove interface list, the ToC shows the same info --- reference/spl/interfaces.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/reference/spl/interfaces.xml b/reference/spl/interfaces.xml index e5a8d47b8fc5..8ac0daf5cc23 100644 --- a/reference/spl/interfaces.xml +++ b/reference/spl/interfaces.xml @@ -9,18 +9,6 @@ and a pair of interfaces to implement the Observer Design Pattern. -
- Interface list - - - OuterIterator - RecursiveIterator - SeekableIterator - SplObserver - SplSubject - -
-
&reftitle.seealso; From 6b710a16b812f15da17bda2f7df22fcb99530eb7 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 10 Dec 2024 23:25:32 +0000 Subject: [PATCH 5/5] Nit Co-authored-by: Christoph M. Becker --- reference/spl/book.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/spl/book.xml b/reference/spl/book.xml index 7fad6c2f4e0a..1a8bb9ae5506 100644 --- a/reference/spl/book.xml +++ b/reference/spl/book.xml @@ -14,7 +14,7 @@ The extension provides various datastructures, generic exceptions, iterators, classes to work with filesystems using an object - orientated API, and utility functions. + oriented API, and utility functions.