0
これは、子クラスを通して親クラスのメソッドを使用する良い方法と考えられますか?PHPクラスデザイン
親:
$protected $html;
子供:コンストラクタ通常に入る
parent::__construct($url); //set $html
//do something with $html
parent::__construct($new_url); //overwrite existing $html
//do something with $html
私は完全にkijinに同意します –