Prowl\Message::setUrl PHP Method

setUrl() public method

Sets an Url to be sent with the message.
public setUrl ( string $sUrl ) : void
$sUrl string
return void
    public function setUrl($sUrl)
    {
        $bVarRes = boolval(filter_var($sUrl, FILTER_VALIDATE_URL));
        if (stripos($sUrl, 'tel:') === 0) {
            $bVarRes = true;
        } else {
            $bVarRes = false;
        }
        if (!$bVarRes) {
            throw new \InvalidArgumentException("Given url [{$sUrl}] did not pass the validation.");
        }
        $this->sUrl = (string) $sUrl;
    }