現在これを行っているのですが、
class Page {
    // variable to hold DBC class
    public $dbc;
    /*
        __CONSTRUCT
        Called when class is initiated and sets the dbc variable to hold the DBC class.
    */
    public function __construct() {
        // set the dbc variable to hold the DBC class
        $this -> dbc = new DBC();
    }
    /*
        CREATE PAGE
        Create a page with the option to pass data into it.
    */
    public function create($title, $class, $data = false) {
        // start buffer
        ob_start('gz_handler');
        // content
        content($this -> dbc, $data);
        // end buffer and flush
        ob_end_flush();
    }
}
例を簡略化しましたが、基本的にDBCメソッド内の関数にオブジェクトを渡す必要がありますcreateか?
extends以前に使用していたが、拡張クラスを変数に抽出する方法がないことに気付いたので、これは悪い習慣と見なされますか?
ありがとう