阅读背景:

在类变量中存储类,我做对了吗?PHP

来源:互联网 

I am doing this currently,

我正在做这个,

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();
    }
class Pa



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: