ZBlogPHP::GetListType PHP Method

GetListType() public method

已改名GetListType,1.5版中扔掉有歧义的GetList
public GetListType ( $type, $sql ) : array
$type
$sql
return array
    public function GetListType($type, $sql)
    {
        $array = null;
        $list = array();
        $array = $this->db->Query($sql);
        if (!isset($array)) {
            return array();
        }
        foreach ($array as $a) {
            $l = new $type();
            $l->LoadInfoByAssoc($a);
            $list[] = $l;
        }
        return $list;
    }
ZBlogPHP