Markdown::converStrArr PHP Méthode

converStrArr() private méthode

将tags, category字符串转成数组
private converStrArr ( $tags, $type )
    private function converStrArr($tags, $type)
    {
        $tagsObjArr = array();
        $tagArrTmp1 = $this->cleanKeywords2Arr($tags);
        foreach ($tagArrTmp1 as $tag) {
            $tag = trim($tag);
            $id = abs(crc32(md5($tag)));
            $tagObj = array("id" => $id, "name" => $tag, "url" => $this->baseurl . "{$type}/" . $id . ".html");
            array_push($tagsObjArr, $tagObj);
            if (!$this->checkObjInArr($tagObj, $type)) {
                if ($type == "tags") {
                    array_push($this->tags, $tagObj);
                } else {
                    array_push($this->categorys, $tagObj);
                }
            }
        }
        return $tagsObjArr;
    }