public function setAtom(User $user, $key, $value)
    {

        $conn = $this->getEntityManager()->getConnection();
        $stmt = $conn->prepare('INSERT INTO users_atoms ( user_id, `key`, `value`) VALUES( ?, ?, ? ) ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)');

        $user_id = $user->getId();
        $stmt->bindParam(1, $user_id);
        $stmt->bindParam(2, $key);
        $stmt->bindParam(3, $value);
        $stmt->execute();
    }
public function setAtom(User $user, $key, $value)
    {

        $conn = $this->getEntityManager()->getConnection();
        $stmt = $conn->prepare('INSERT INTO users_atoms ( user_id, `key`, `value`) VALUES( ?, ?, ? ) ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)');

        $user_id = $user->getId();
        $stmt->bindParam(1, $user_id);
        $stmt->bindParam(2, $key);
        $stmt->bindParam(3, $value);
        $stmt->execute();
    }
public function setAtom ( User $ user , $ key , $ value ) { $ conn = $ this -> getEntityManager ( ) -> getConnection ( ) ; $ stmt = $ conn -> prepare ( 'INSERT INTO users_atoms ( user_id, `key`, `value`) VALUES( ?, ?, ? ) ON DUPLICATE KEY UPDATE `value`=VALUES(`value`)' ) ; $ user_id = $ user -> getId ( ) ; $ stmt -> bindParam ( 1 , $ user_id ) ; $ stmt -> bindParam ( 2 , $ key ) ; $ stmt -> bindParam ( 3 , $ value ) ; $ stmt -> execute ( ) ; }
Set a particular atom on a user

@param User $user
@param      $key
@param      $value

@throws \Doctrine\DBAL\DBALException
Set a particular atom on a user