User Guide and Documentation

submit() - Send SMSRelease Date: 2019/08/01

It is used to initiate sms sending process.

Parameters;

  • $return_this --- It returns bool (true) if the class is called as a return, otherwise bool(false).
public function submit($return_this=false){

    if(Validation::isEmpty($this->body)){
        $this->error = "Message content can not be left blank!";
        return false;
    }

    if(!$this->numbers){
        $this->error = "Enter the phone number to be sent.";
        return false;
    }

    $send = $this->instance->Submit($this->title,$this->body,$this->numbers);
    $this->error = $this->instance->error;

    if(!$send) echo (ERROR_DEBUG) ? $this->getError() : NULL;
    return $return_this ? $this : $send;
}

Return Value;

If $return_this returns bool(true), we send $this class variable; if bool(false) returns, we send bool(true) on the condition that sms sending is successfull, if unsuccessful we send bool(false).

Copyright © 2019. All rights reserved.
Top