protected function insert($data)
    {
        try {

            if ($this->creationTouch) {
                $data[$this->creationTouchName] = date('Y-m-d H:i:s');
            }

            $this->db->insert($this->table, $this->fromArray($data));

            $id = $this->db->lastInsertId($this->sequence ? $this->sequence : $this->primaryKey);

        } catch (\Exception $e) {
            throw $e;
        }

        return $id;
    }
protected function insert($data)
    {
        try {

            if ($this->creationTouch) {
                $data[$this->creationTouchName] = date('Y-m-d H:i:s');
            }

            $this->db->insert($this->table, $this->fromArray($data));

            $id = $this->db->lastInsertId($this->sequence ? $this->sequence : $this->primaryKey);

        } catch (\Exception $e) {
            throw $e;
        }

        return $id;
    }
protected function insert ( $ data ) { try { if ( $ this -> creationTouch ) { $ data [ $ this -> creationTouchName ] = date ( 'Y-m-d H:i:s' ) ; } $ this -> db -> insert ( $ this -> table , $ this -> fromArray ( $ data ) ) ; $ id = $ this -> db -> lastInsertId ( $ this -> sequence ? $ this -> sequence : $ this -> primaryKey ) ; } catch ( \ Exception $ e ) { throw $ e ; } return $ id ; }
Insere um novo registro na tabela.

@param array $data

@return integer Identificador do registro inserido

@throws \Exception
Insere um novo registro na tabela .