ZBlogPHP::__construct PHP Method

__construct() public method

构造函数,加载基本配置到$zbp
public __construct ( )
    public function __construct()
    {
        global $option, $lang, $blogpath, $bloghost, $cookiespath, $usersdir, $table, $datainfo, $actions, $action, $blogversion, $blogtitle, $blogname, $blogsubname, $blogtheme, $blogstyle, $currenturl, $activedapps, $posttype;
        if (ZBP_HOOKERROR) {
            ZBlogException::SetErrorHook();
        }
        //基本配置加载到$zbp内
        $this->version =& $blogversion;
        $this->option =& $option;
        $this->lang =& $lang;
        $this->path =& $blogpath;
        $this->host =& $bloghost;
        $this->cookiespath =& $cookiespath;
        $this->usersdir =& $usersdir;
        $this->table =& $table;
        $this->datainfo =& $datainfo;
        $this->actions =& $actions;
        $this->posttype =& $posttype;
        $this->currenturl =& $currenturl;
        $this->action =& $action;
        $this->activedapps =& $activedapps;
        $this->activeapps =& $this->activedapps;
        $this->guid =& $this->option['ZC_BLOG_CLSID'];
        $this->title =& $blogtitle;
        $this->name =& $blogname;
        $this->subname =& $blogsubname;
        $this->theme =& $blogtheme;
        $this->style =& $blogstyle;
        $this->managecount =& $this->option['ZC_MANAGE_COUNT'];
        $this->pagebarcount =& $this->option['ZC_PAGEBAR_COUNT'];
        $this->searchcount =& $this->option['ZC_SEARCH_COUNT'];
        $this->displaycount =& $this->option['ZC_DISPLAY_COUNT'];
        $this->commentdisplaycount =& $this->option['ZC_COMMENTS_DISPLAY_COUNT'];
        $this->categories =& $this->categorys;
        $this->categoriesbyorder =& $this->categorysbyorder;
        $this->user = new stdClass();
        foreach ($this->datainfo['Member'] as $key => $value) {
            $this->user->{$key} = $value[3];
        }
        $this->user->Metas = new Config();
    }
ZBlogPHP