Skip to content

Commit

Permalink
version 2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
christopheexakat committed Sep 26, 2023
1 parent 95ab544 commit 52883f9
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 103 deletions.
43 changes: 37 additions & 6 deletions Reference/Cobblers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,31 +255,62 @@ _____

.. _classes-changeclass:

.. _classes-changeclass:
.. _change-class:

Classes/ChangeClass
+++++++++++++++++++
Change Class
++++++++++++
This cobbler replaces a class by another one, and leave the original class intact.

This cobbler is useful for inserting new classes instead of native PHP or library related ones: the usage shall be changed, but not the definition.

.. _classes-changeclass-before:
It might also be useful to update code, but keep older classes available for backward compatibility or fallback strategies.


.. _change-class-before:

Before
______
.. code-block:: php
<?php
class oldClass {}
$a = new oldClass;
?>
.. _classes-changeclass-after:
.. _change-class-after:

After
_____
.. code-block:: php
<?php
class oldClass {}
$a = new newClass;
?>
.. _change-class-related-cobbler:

Related Cobblers
________________

* :ref:`rename-class`

.. _change-class-reverse-cobbler:

Reverse Cobbler
_______________

* :ref:`change-class`



.. _classes-changeclass-specs:
.. _change-class-specs:

Specs
_____
Expand Down

0 comments on commit 52883f9

Please sign in to comment.