Markdown::initAllBlogData PHP Méthode

initAllBlogData() public méthode

加载所有的博客
public initAllBlogData ( $postPath, $enableCache = false )
    public function initAllBlogData($postPath, $enableCache = false)
    {
        $this->blogs = array();
        $this->tags = array();
        $this->categorys = array();
        $this->yearMonths = array();
        $this->enableCache = $enableCache;
        $this->baseurl = preg_replace('/^(http|https):\\/\\/[^\\/]*?(\\/.*)$/', '\\2', base_url(""));
        //先读缓存
        if (!$this->globalDataCacheRead()) {
            //列出所有文件,可能包含非markdown文件
            $mdfiles = get_dir_file_info($postPath, FALSE);
            $this->readAllPostInfo($mdfiles, $postPath);
        }
    }