public function saveLink($linkData)
    {
        $connection = $this->getConnection();

        if (isset($linkData['delete_after']) && ($linkData['delete_after'] instanceof \DateTime)) {
            $linkData['delete_after'] = $this->formatDate($linkData['delete_after']);
        }

        $connection->insertOnDuplicate(
            $this->getMainTable(),
            $linkData,
            array_keys($linkData)
        );
    }
public function saveLink($linkData)
    {
        $connection = $this->getConnection();

        if (isset($linkData['delete_after']) && ($linkData['delete_after'] instanceof \DateTime)) {
            $linkData['delete_after'] = $this->formatDate($linkData['delete_after']);
        }

        $connection->insertOnDuplicate(
            $this->getMainTable(),
            $linkData,
            array_keys($linkData)
        );
    }
public function saveLink ( $ linkData ) { $ connection = $ this -> getConnection ( ) ; if ( isset ( $ linkData [ 'delete_after' ] ) && ( $ linkData [ 'delete_after' ] instanceof \ DateTime ) ) { $ linkData [ 'delete_after' ] = $ this -> formatDate ( $ linkData [ 'delete_after' ] ) ; } $ connection -> insertOnDuplicate ( $ this -> getMainTable ( ) , $ linkData , array_keys ( $ linkData ) ) ; }
Save customer link.

@param array $linkData array containing visitor_id, session_id, customer_id and delete_after.
Save customer link .