public function insert($data)
    {
        $row = $this->getTable()->insert($data);
        if (!$row instanceof IRow) {
            return $row;
        }

        if ($this->auditLogRepository) {
            $to = $this->filterValues($this->excludeColumns((array)$data));

            $data = [
                'version' => '1',
                'from' => [],
                'to' => $to,
            ];
            $this->pushAuditLog(AuditLogRepository::OPERATION_CREATE, $row->getSignature(), $data);
        }

        return $row;
    }
public function insert($data)
    {
        $row = $this->getTable()->insert($data);
        if (!$row instanceof IRow) {
            return $row;
        }

        if ($this->auditLogRepository) {
            $to = $this->filterValues($this->excludeColumns((array)$data));

            $data = [
                'version' => '1',
                'from' => [],
                'to' => $to,
            ];
            $this->pushAuditLog(AuditLogRepository::OPERATION_CREATE, $row->getSignature(), $data);
        }

        return $row;
    }
public function insert ( $ data ) { $ row = $ this -> getTable ( ) -> insert ( $ data ) ; if ( ! $ row instanceof IRow ) { return $ row ; } if ( $ this -> auditLogRepository ) { $ to = $ this -> filterValues ( $ this -> excludeColumns ( ( array ) $ data ) ) ; $ data = [ 'version' => '1' , 'from' => [ ] , 'to' => $ to , ] ; $ this -> pushAuditLog ( AuditLogRepository :: OPERATION_CREATE , $ row -> getSignature ( ) , $ data ) ; } return $ row ; }
Insert inserts data to the repository. If single IRow is returned, it attempts to log audit information.

@param $data
@return bool|int|IRow
Insert inserts data to the repository . If single IRow is returned it attempts to log audit information .