5) { return; } if (is_array($where)) { $where = array_merge(['stat' => ['eq', '0']], $where); } if ($where) { $this->where($where); } if ($order) { $this->order($order); } if ($field) { $this->field($field); } if (empty($limit)) { $limit = Config::get('list_rows'); } if ($limit) { $this->limit($limit); } $list = $this->select(); if ($list) { foreach ($list as $k => $row) { $alldata[] = $row; } } return $alldata; } public function getBulkList($where = null, $order = null, $field = null, $limit = null) { if (is_array($where)) { $where = array_merge(['stat' => ['eq', '0']], $where); } if ($where) { $this->where($where); } if ($field) { $this->field($field); } if ($order) { $this->order($order); } if ($limit) { $this->limit($limit); } $data = $this->select(); return $data; } protected function setCreatetimeAttr($value, $data) { return time(); } protected function setContentAttr($content, $data) { if (!empty($content)) { $config = \HTMLPurifier_Config::createDefault(); $purifier = new \HTMLPurifier($config); $content = $purifier->purify($content); } return $content; } }