/** * 更新实体, 必须指定实体的主键值 * @param object $entity */ public function replace($entity) { $arrayId = array(); if (is_array($entity)) { foreach ($entity as $object) { $id = DaoSupport::replaceEntity($object); array_push($arrayId, $id); } } else { return DaoSupport::replaceEntity($entity); } return $arrayId; }