public function addContact($phoneNumber, $firstName, $lastName)
    {
        $phoneNumber = preg_replace('%[^0-9]%', '', (string) $phoneNumber);
        if (empty($phoneNumber)) {
            return false;
        }

        return $this->exec('add_contact ' . $phoneNumber . ' ' . $this->escapeStringArgument($firstName)
            . ' ' . $this->escapeStringArgument($lastName));
    }
public function addContact($phoneNumber, $firstName, $lastName)
    {
        $phoneNumber = preg_replace('%[^0-9]%', '', (string) $phoneNumber);
        if (empty($phoneNumber)) {
            return false;
        }

        return $this->exec('add_contact ' . $phoneNumber . ' ' . $this->escapeStringArgument($firstName)
            . ' ' . $this->escapeStringArgument($lastName));
    }
public function addContact ( $ phoneNumber , $ firstName , $ lastName ) { $ phoneNumber = preg_replace ( '%[^0-9]%' , '' , ( string ) $ phoneNumber ) ; if ( empty ( $ phoneNumber ) ) { return false ; } return $ this -> exec ( 'add_contact ' . $ phoneNumber . ' ' . $ this -> escapeStringArgument ( $ firstName ) . ' ' . $ this -> escapeStringArgument ( $ lastName ) ) ; }
Adds a user to the contact list

@param string $phoneNumber The phone-number of the new contact, needs to be a telegram-user.
Every char that is not a number gets deleted, so you don't need to care about spaces,
'+' and so on.
@param string $firstName The first name of the new contact
@param string $lastName The last name of the new contact

@return object|boolean The new contact-info as an object; false if somethings goes wrong

@uses exec()
@uses escapeStringArgument()
Adds a user to the contact list