Skip to content

Commit

Permalink
[migration84] 可視性 -> アクセス権
Browse files Browse the repository at this point in the history
  • Loading branch information
mumumu committed Dec 8, 2024
1 parent 3fa7063 commit 10e6e99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions appendices/migration84/new-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ print $p->fullName; // Prints "Peter Peterson"
<title>非対称可視性プロパティ</title>

<simpara>
オブジェクトのプロパティは、<literal>set</literal> の可視性を <literal>get</literal> の可視性とは別に制御できるようになりました
オブジェクトのプロパティは、<literal>set</literal> のアクセス権を <literal>get</literal> のアクセス権とは別に制御できるようになりました
</simpara>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
class Example
{
// 最初の可視性修飾子は取得時の可視性を制御し、2つ目の修飾子は設定時の可視性を制御します
// 取得時の可視性は設定時の可視性よりも狭くなってはいけません
// 最初のアクセス権の修飾子は get 時のアクセス権を制御し、2つ目の修飾子は set 時のアクセス件を制御します
// 取得時のアクセス権は設定時のそれよりも狭くなってはいけません
public protected(set) string $name;
public function __construct(string $name)
Expand Down

0 comments on commit 10e6e99

Please sign in to comment.