diff --git a/Book/index.rst b/Book/index.rst index ae8e33bd..880d2182 100644 --- a/Book/index.rst +++ b/Book/index.rst @@ -7,23 +7,23 @@ PHP 5 .. toctree:: :maxdepth: 2 - introduction.rst - build_system.rst + php5/introduction.rst + php5/build_system.rst * Creating PHP extensions .. toctree:: :maxdepth: 2 - zvals.rst + php5/zvals.rst * Implementing functions .. toctree:: :maxdepth: 2 - hashtables.rst - classes_objects.rst + php5/hashtables.rst + php5/classes_objects.rst PHP 7 ----- diff --git a/Book/build_system.rst b/Book/php5/build_system.rst similarity index 100% rename from Book/build_system.rst rename to Book/php5/build_system.rst diff --git a/Book/build_system/building_extensions.rst b/Book/php5/build_system/building_extensions.rst similarity index 100% rename from Book/build_system/building_extensions.rst rename to Book/php5/build_system/building_extensions.rst diff --git a/Book/build_system/building_php.rst b/Book/php5/build_system/building_php.rst similarity index 100% rename from Book/build_system/building_php.rst rename to Book/php5/build_system/building_php.rst diff --git a/Book/classes_objects.rst b/Book/php5/classes_objects.rst similarity index 100% rename from Book/classes_objects.rst rename to Book/php5/classes_objects.rst diff --git a/Book/classes_objects/custom_object_storage.rst b/Book/php5/classes_objects/custom_object_storage.rst similarity index 100% rename from Book/classes_objects/custom_object_storage.rst rename to Book/php5/classes_objects/custom_object_storage.rst diff --git a/Book/classes_objects/implementing_typed_arrays.rst b/Book/php5/classes_objects/implementing_typed_arrays.rst similarity index 100% rename from Book/classes_objects/implementing_typed_arrays.rst rename to Book/php5/classes_objects/implementing_typed_arrays.rst diff --git a/Book/classes_objects/internal_structures_and_implementation.rst b/Book/php5/classes_objects/internal_structures_and_implementation.rst similarity index 100% rename from Book/classes_objects/internal_structures_and_implementation.rst rename to Book/php5/classes_objects/internal_structures_and_implementation.rst diff --git a/Book/classes_objects/iterators.rst b/Book/php5/classes_objects/iterators.rst similarity index 100% rename from Book/classes_objects/iterators.rst rename to Book/php5/classes_objects/iterators.rst diff --git a/Book/classes_objects/magic_interfaces_comparable.rst b/Book/php5/classes_objects/magic_interfaces_comparable.rst similarity index 100% rename from Book/classes_objects/magic_interfaces_comparable.rst rename to Book/php5/classes_objects/magic_interfaces_comparable.rst diff --git a/Book/classes_objects/object_handlers.rst b/Book/php5/classes_objects/object_handlers.rst similarity index 100% rename from Book/classes_objects/object_handlers.rst rename to Book/php5/classes_objects/object_handlers.rst diff --git a/Book/classes_objects/serialization.rst b/Book/php5/classes_objects/serialization.rst similarity index 100% rename from Book/classes_objects/serialization.rst rename to Book/php5/classes_objects/serialization.rst diff --git a/Book/classes_objects/simple_classes.rst b/Book/php5/classes_objects/simple_classes.rst similarity index 100% rename from Book/classes_objects/simple_classes.rst rename to Book/php5/classes_objects/simple_classes.rst diff --git a/Book/hashtables.rst b/Book/php5/hashtables.rst similarity index 100% rename from Book/hashtables.rst rename to Book/php5/hashtables.rst diff --git a/Book/hashtables/array_api.rst b/Book/php5/hashtables/array_api.rst similarity index 100% rename from Book/hashtables/array_api.rst rename to Book/php5/hashtables/array_api.rst diff --git a/Book/hashtables/basic_structure.rst b/Book/php5/hashtables/basic_structure.rst similarity index 100% rename from Book/hashtables/basic_structure.rst rename to Book/php5/hashtables/basic_structure.rst diff --git a/Book/hashtables/hash_algorithm.rst b/Book/php5/hashtables/hash_algorithm.rst similarity index 100% rename from Book/hashtables/hash_algorithm.rst rename to Book/php5/hashtables/hash_algorithm.rst diff --git a/Book/hashtables/hashtable_api.rst b/Book/php5/hashtables/hashtable_api.rst similarity index 100% rename from Book/hashtables/hashtable_api.rst rename to Book/php5/hashtables/hashtable_api.rst diff --git a/Book/hashtables/images/basic_hashtable.svg b/Book/php5/hashtables/images/basic_hashtable.svg similarity index 100% rename from Book/hashtables/images/basic_hashtable.svg rename to Book/php5/hashtables/images/basic_hashtable.svg diff --git a/Book/hashtables/images/doubly_linked_hashtable.svg b/Book/php5/hashtables/images/doubly_linked_hashtable.svg similarity index 100% rename from Book/hashtables/images/doubly_linked_hashtable.svg rename to Book/php5/hashtables/images/doubly_linked_hashtable.svg diff --git a/Book/hashtables/images/ordered_hashtable.svg b/Book/php5/hashtables/images/ordered_hashtable.svg similarity index 100% rename from Book/hashtables/images/ordered_hashtable.svg rename to Book/php5/hashtables/images/ordered_hashtable.svg diff --git a/Book/introduction.rst b/Book/php5/introduction.rst similarity index 100% rename from Book/introduction.rst rename to Book/php5/introduction.rst diff --git a/Book/zvals.rst b/Book/php5/zvals.rst similarity index 100% rename from Book/zvals.rst rename to Book/php5/zvals.rst diff --git a/Book/zvals/basic_structure.rst b/Book/php5/zvals/basic_structure.rst similarity index 99% rename from Book/zvals/basic_structure.rst rename to Book/php5/zvals/basic_structure.rst index f33f2b9c..3a066156 100644 --- a/Book/zvals/basic_structure.rst +++ b/Book/php5/zvals/basic_structure.rst @@ -82,11 +82,11 @@ than this would cause an overflow (thus making the length negative). The remaining three types will only be mentioned here quickly and discussed in greater detail in their own chapters: Arrays use the ``IS_ARRAY`` type tag and are stored in the ``HashTable *ht`` member. How the ``HashTable`` structure -works will be discussed in the :doc:`/hashtables` chapter. +works will be discussed in the :doc:`/php5/hashtables` chapter. Objects (``IS_OBJECT``) use the ``zend_object_value obj`` member, which consists of an "object handle", which is an integer ID used to look up the actual data of the object, and a set of "object handlers", which define how the object -behaves. PHP's class and object system will be described in the :doc:`/classes_objects` chapter. +behaves. PHP's class and object system will be described in the :doc:`/php5/classes_objects` chapter. Resources (``IS_RESOURCE``) are similar to objects in that they also store a unique ID that can be used to look up the actual value. This ID is stored in the ``long lval`` member. Resources are covered in the Resources chapter (which diff --git a/Book/zvals/casts_and_operations.rst b/Book/php5/zvals/casts_and_operations.rst similarity index 100% rename from Book/zvals/casts_and_operations.rst rename to Book/php5/zvals/casts_and_operations.rst diff --git a/Book/zvals/memory_management.rst b/Book/php5/zvals/memory_management.rst similarity index 100% rename from Book/zvals/memory_management.rst rename to Book/php5/zvals/memory_management.rst diff --git a/build_html.sh b/build_html.sh index 0fcf3e92..4f6f8ad8 100755 --- a/build_html.sh +++ b/build_html.sh @@ -1 +1,2 @@ -sphinx-build -b html -d BookHTML/doctrees Book BookHTML/html \ No newline at end of file +sphinx-build -b html -d BookHTML/doctrees Book BookHTML/html +php generate_php5_redirects.php \ No newline at end of file diff --git a/build_release_html.sh b/build_release_html.sh index 823cc5c8..0231d6d9 100755 --- a/build_release_html.sh +++ b/build_release_html.sh @@ -4,4 +4,5 @@ rm -rf BookHTML/html/*/ rm -f BookHTML/html/*.html rm -f BookHTML/html/.buildinfo -sphinx-build -b html -d BookHTML/doctrees -a Book BookHTML/html \ No newline at end of file +sphinx-build -b html -d BookHTML/doctrees -a Book BookHTML/html +php generate_php5_redirects.php \ No newline at end of file diff --git a/generate_php5_redirects.php b/generate_php5_redirects.php new file mode 100755 index 00000000..fcf933e5 --- /dev/null +++ b/generate_php5_redirects.php @@ -0,0 +1,59 @@ + + +
+ + + + + + +