Get the URL.

@param  string  $value

@return string
966674
public function getLinkAttribute($value)
    {
        $control = app('antares.acl')->make('antares/acl');

        if ($control->can('roles-list')) {
            return handles('antares::acl/index/roles');
        }
        if ($control->can('admin-list')) {
            return handles('antares::acl/users/index');
        }

        return '#';
    }
50895
protected function encode($value)
    {
        $key = (string) $value;
        if (!isset(static::$cacheEncode[$key])) {
            $isAngularVar = false;
            if (\mb_substr($value, 0, 2) == '{{' && \mb_substr($value, -2) == '}}') {
                $isAngularVar = true;
                $value = \trim(\mb_substr($value, 2, -2));
            }
            static::$cacheEncode[$key] = \rawurlencode($value);
            static::$cacheEncode[$key] = \strtr(static::$cacheEncode[$key], static::$urlencodeCorrectionMap);
            if ($isAngularVar === true) {
                static::$cacheEncode[$key] = '{{ ' . static::$cacheEncode[$key] . ' }}';
            }
        }

        return static::$cacheEncode[$key];
    }
814747
public function resolveLinks($value)
    {
        if (is_array($value)) {
            return array_map([$this, 'resolveLinks'], $value);
        }

        if (is_string($value) && strpos($value, '{@') !== false) {
            $value = $this->resolveLinksInString($value);
        }

        return $value;
    }
822059
protected function valueToString($value) : string
    {
        if ($value === null) {
            $def_value = 'null';
        } elseif ($value === false) {
            $def_value = 'false';
        } elseif ($value === true) {
            $def_value = 'true';
        } elseif (is_string($value)) {
            $def_value = '"' . str_replace('"', '\\"', $value) . '"';
        } elseif (is_numeric($value)) {
            $def_value = '' . $value;
        }

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

        return $value;
    }
1322983
private function _validateUrl ($value)
    {
        $pattern = '/^{schemes}:\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(?::\d{1,5})?(?:$|[?\/#])/i';
        $validSchemes = ['http', 'https'];
        $pattern = str_replace('{schemes}', '(' . implode('|', $validSchemes) . ')', $pattern);
        if (!preg_match($pattern, $value)) {
            return false;
        }
        return true;
    }
1062321
public static function cmd($value): string
    {
        $value = Str::low($value);
        $value = preg_replace('#[^a-z0-9\_\-\.]#', '', $value);
        $value = Str::trim($value);

        return $value;
    }
279641
public function getString($value)
    {
        $number = floatval($value);
        $number = round(($number + 0.000001) * 20) / 20;

        return sprintf('CHF %s',
            number_format($number, 2, '.', '\'')
        );
    }
907470
public static function factory($value): string
    {
        $data = Data::make($value);
        return self::evaluate($data, $value)->isString()->getValue();
    }
28057
private function filter(string $value) : string
    {
        foreach ($this->filters as $filter) {
            $value = $filter($value);
        }

        return $value;
    }
837204
public function parse_value($value) {

        if (strpos($value, '$LtiLink.custom.url') !== false) {
            $id = optional_param('id', 0, PARAM_INT); // Course Module ID.
            if (!empty($id)) {
                $cm = get_coursemodule_from_id('lti', $id, 0, false, MUST_EXIST);
                $this->params['link_id'] = $cm->instance;
            }
            $value = str_replace('$LtiLink.custom.url', parent::get_endpoint(), $value);
        }
        return $value;

    }
381568
private function getSourceValue($value)
    {
        if (!empty($value)) {
            $value = json_decode($value, true);

            if (preg_match('/^image\//i', $value[0]['type']))
                return str_replace('\\', '/', $value[0]['url']);

            return "";
        }

        return "";
    }
1127440
public static function getPathFromURL($url)
	{
		$path = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		$path = str_replace(self::getDomainFromURL($url), '', $path);
		
		if($path == '') return '/';
		
		return $path;
	}
454720
protected function getIdFromValue(string $value)
    {
        try {
            if (null !== $item = $this->getIriConverter()->getItemFromIri($value, ['fetch_data' => false])) {
                return $this->getPropertyAccessor()->getValue($item, 'id');
            }
        } catch (InvalidArgumentException $e) {
            // Do nothing, return the raw value
        }

        return $value;
    }
108299
public static function realUrl(string $value)
    {
        list($scheme, $url) = explode('//', $value);
        $reverse = explode('/', $url);
        $arr = [];
        foreach ($reverse as $item) {
            $arr[] = $item;
            if ($item == '..') {
                array_pop($arr);    // remove 2x from array stack
                array_pop($arr);
            }
        }
        return $scheme . '//' . implode('/', $arr);
    }
395761
protected function getFilterValueFromUrl($value)
    {
        try {
            if ($item = $this->iriConverter->getItemFromIri($value)) {
                return $this->propertyAccessor->getValue($item, 'id');
            }
        } catch (\InvalidArgumentException $e) {
            // Do nothing, return the raw value
        }

        return $value;
    }
752236
public static function getHost($value)
    {
        if (preg_match(self::REGEXP_TCP, $value, $matches)) {
            return preg_replace("/^http:/", "tcp:", $matches[2]);
        }

        if (preg_match(self::REGEXP_SSL, $value, $matches)) {
            return preg_replace("/^https:/", "ssl:", $matches[2]);
        }

        return null;
    }