mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
tweaked example code comments, [method|interface] links.
This commit is contained in:
parent
7ad83bb05b
commit
90f5f73e9b
1 changed files with 3 additions and 3 deletions
|
@ -299,7 +299,7 @@ function paint(Colorful $c) { ... }
|
|||
|
||||
paint(Suit::Clubs); // Works
|
||||
|
||||
print Suit::Diamonds->shape(); // prints "rectangle"
|
||||
print Suit::Diamonds->shape(); // prints "Rectangle"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -612,7 +612,7 @@ $x = Direction::Up['short'];
|
|||
|
||||
<para>
|
||||
Additionally, enum cases may not be instantiated directly with <literal>new</literal>, nor with
|
||||
<literal>newInstanceWithoutConstructor</literal> in reflection. Both will result in an error.
|
||||
<methodname>ReflectionClass::newInstanceWithoutConstructor</methodname> in reflection. Both will result in an error.
|
||||
</para>
|
||||
|
||||
<programlisting role="php">
|
||||
|
@ -632,7 +632,7 @@ $horseshoes = (new ReflectionClass(Suit::class))->newInstanceWithoutConstructor(
|
|||
|
||||
<para>
|
||||
Both Pure Enums and Backed Enums implement an internal interface named
|
||||
<literal>UnitEnum</literal>. <literal>UnitEnum</literal> includes a static method
|
||||
<interfacename>UnitEnum</interfacename>. <literal>UnitEnum</literal> includes a static method
|
||||
<literal>cases()</literal>. <literal>cases()</literal> returns a packed array of
|
||||
all defined Cases in the order of declaration.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue