/** * 开启事务,会先判断是否在一个事务内 * @return bool */ public final function begin() { return $this->in() or $this->db->beginTransaction(); }