Toplan\PhpSms\Sms::send PHP 메소드

send() 공개 메소드

If give a true parameter, this system will immediately start request to send SMS/voice verify whatever whether to use the queue. if you are already pushed sms instance to the queue, you can recall the method send() in queue system without true parameter, so this mechanism in order to make you convenient use the method send() in queue system.
public send ( boolean $immediately = false ) : mixed
$immediately boolean
리턴 mixed
    public function send($immediately = false)
    {
        if (!self::$enableQueue || $this->pushedToQueue) {
            $immediately = true;
        }
        if ($immediately) {
            $result = Balancer::run(self::TASK_NAME, ['data' => $this->getData(), 'driver' => $this->firstAgent]);
        } else {
            $result = $this->push();
        }
        return $result;
    }