○progate phpⅢ アクセス権について 親クラスのプロパティの設定がprivateになっている場合、子クラスからのアクセス ができない。 そこで子クラスからアクセスする場合はプロパティをprotectedにする必要がある。 ・重複しているコードをまとめる public function __construct($name,$price,$image,$type){ parent::__construct($name,$price,$image,$type); $this->type=$type; 上記を子クラス側への記述で親クラスと重複しているプロパティのへのアクセスとなる ・if〜e…