mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Make abstract constructor signature enforcement more clear
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@316911 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6306561c68
commit
f055002534
2 changed files with 5 additions and 5 deletions
|
@ -18,9 +18,9 @@
|
|||
<link linkend="language.oop5.visibility">visibility</link>. For example,
|
||||
if the abstract method is defined as protected, the function implementation
|
||||
must be defined as either protected or public, but not private. Furthermore
|
||||
the signatures of the methods must match, i.e. type hints and optional
|
||||
arguments must be the same. The last restriction also applies to constructors
|
||||
as of PHP 5.4. Before 5.4 constructor signatures could differ.
|
||||
the signatures of the methods must match, i.e. the type hints and the number
|
||||
of required arguments must be the same. This also applies to constructors as
|
||||
of PHP 5.4. Before 5.4 constructor signatures could differ.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<row>
|
||||
<entry>5.4.0</entry>
|
||||
<entry>
|
||||
Changed: If an abstract class defines a signature for the constructor
|
||||
it will now be enforced.
|
||||
Changed: If an <link linkend="language.oop5.abstract">abstract</link> class
|
||||
defines a signature for the constructor it will now be enforced.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
|
Loading…
Reference in a new issue