Slide 17
Slide 17 text
公開されていない内部の知識を使うと、強度はいちばん高い
(侵入結合)
class Customer
{
private string $status;
}
PHP
別のモジュール
//
$property = new ReflectionProperty(Customer::class, 'status');
$status = $property->getValue($customer);
クラスの作者は、外から読まれていることを知らない
プロパティ名を変える度に変更が必要
17/56