Toplan\PhpSms\Sms::push PHP Method

push() public method

Push to the queue by a custom method.
public push ( ) : mixed
return mixed
    public function push()
    {
        if (is_callable(self::$howToUseQueue)) {
            try {
                $this->pushedToQueue = true;
                return call_user_func_array(self::$howToUseQueue, [$this, $this->getData()]);
            } catch (\Exception $e) {
                $this->pushedToQueue = false;
                throw $e;
            }
        } else {
            throw new PhpSmsException('Please define how to use queue by this static method: queue(...)');
        }
    }