Create a Url instance from a string.

@param string $value
@return $this
199094
function fromString($value)
    {
        $this->clear();
        $this->orignalValue = $this->returnValue  = (string) $value;
        return $this->parse();
    }
1150508
public function parse_value($value) {
        if (strpos($value, '$ToolProxy.custom.url') !== false) {
            $value = str_replace('$ToolProxy.custom.url', parent::get_endpoint(), $value);
        }
        return $value;

    }
252954
public static function url(string $value): bool
    {
        $result = filter_var($value, FILTER_VALIDATE_URL);
        return is_string($result) && $value === $result;
    }
1295879
public function setUri(string $value) : Permission
    {

        if ($this->data['uri'] !== $value) {
            $this->data['uri'] = $value;
            $this->setModified('uri');
        }

        return $this;
    }
1311033
public function setCoreUseBrowser($value)
    {
        $this->setFieldName('use_browser');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1272707
static function fromValue($value)
    {
        $key = self::getKey($value);

        return self::$instanceCache[static::class][$key]
            ?? (self::$instanceCache[static::class][$key] = new static($key, static::getValue($key)));
    }
275771
private function clone(string $parameter, $value): self
    {
        $directives = clone $this;
        $directives->$parameter = $value;
        return $directives;
    }
528470
protected function clean_url($value) {
        global $CFG;

        if (empty($value)) {
            // Nothing.

        } else if (strpos($value, $CFG->wwwroot . '/') === 0) {
            $value = str_replace($CFG->wwwroot, '', $value);

        } else if (strpos($value, '/') !== 0) {
            debugging("Invalid url_select urls parameter: url '$value' is not local relative url!", DEBUG_DEVELOPER);
        }

        return $value;
    }
1076539
protected function getSiteURL($value)
    {
        if( ! IS::url($value) )
        {
            $value = Request::getSiteURL($value);
        }

        return $value;
    }
957387
private function upgradeUrl(&$value)
    {
        if (!empty($value)
            && false === strpos($value, 'http://')
            && false === strpos($value, 'https://')
            && false === strpos($value, 'ftp://')
            && false === strpos($value, 'ftps://')
            && false === strpos($value, 'mailto:')
            && false === strpos($value, '//')
        ) {
            $value = 'http://' . $value;
        }

        return $value;
    }
1138720
public static function isURLWithHTTPScheme(string $value): bool
    {
        try {
            $url = new URL($value);
        } catch (TypeError $exception) {
            return false;
        }
        return in_array($url->protocol, ['http:', 'https:']);
    }
568941
public function setLink(?string $value) : Log
    {

        if ($this->data['link'] !== $value) {
            $this->data['link'] = $value;
            $this->setModified('link');
        }

        return $this;
    }
1211550
public function setValue( $value ) {
		if ( strtolower( $this->tag ) === 'textarea' ) {
			$this->clearContent();
			$this->appendContent( $value );
		} else {
			$this->setAttributes( [ 'value' => $value ] );
		}
		return $this;
	}
323375
public function setCorePhpthumbNohotlinkTextMessage($value)
    {
        $this->setFieldName('phpthumb_nohotlink_text_message');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
636271
private function stringEscaped($value)
    {
        $value = $this->string($value);
        $value = str_replace(self::$strReplaceFrom, self::$strReplaceTo, $value);

        return $value;
    }
182842
function (value) {
        if (is(value).a(Object)) value = Unirest.serializers.form(value)
        if (!value.length) return $this
        $this.options.url += (does($this.options.url).contain('?') ? '&' : '?') + value
        return $this
      }
847559
public function setText($value)
    {
        $this->text = $value;

        // Auto-convert into html.
        if (is_object($value) && stripos(get_class($value), 'HtmlGenerator\\Html')) {
            $this->text = (string) $value;
        }

        return $this;
    }