Skip to content

Commit

Permalink
Update RevCheck tag after
Browse files Browse the repository at this point in the history
ee0f07e syncs this with EN
  • Loading branch information
Girgias committed Nov 10, 2023
1 parent e39400a commit 11d5ca2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions language/oop5/final.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1ae887f71cee9a2b171e8344cef33af689cfcde0 Maintainer: chuso Status: ready -->
<!-- EN-Revision: 5e8652131e898cd3d02cd26eeb26da718a6aaf65 Maintainer: chuso Status: ready -->
<!-- Reviewed: no Maintainer: andresdzphp -->
<sect1 xml:id="language.oop5.final" xmlns="http://docbook.org/ns/docbook">
<title>Palabra clave Final</title>
<para>
PHP introduce la palabra clave final, que impide que las clases
hijas sobrescriban un método, antecediendo su definición con <emphasis>final</emphasis>.
hijas sobrescriban un método, antecediendo su definición con <literal>final</literal>.
Si la propia clase se define como final, entonces no se podrá heredar de ella.
</para>
<para>
Expand All @@ -19,7 +18,7 @@ class BaseClass {
public function test() {
echo "llamada a BaseClass::test()\n";
}
final public function moreTesting() {
echo "llamada a BaseClass::moreTesting()\n";
}
Expand All @@ -31,7 +30,7 @@ class ChildClass extends BaseClass {
}
}
// Devuelve un error Fatal: Cannot override final method BaseClass::moreTesting()
?>
?>
]]>
</programlisting>
</example>
Expand All @@ -56,7 +55,7 @@ final class BaseClass {
class ChildClass extends BaseClass {
}
// Devuelve un error Fatal: Class ChildClass may not inherit from final class (BaseClass)
?>
?>
]]>
</programlisting>
</example>
Expand Down

0 comments on commit 11d5ca2

Please sign in to comment.