setLiveUpdateURL class method

Set up live update URL address

@access        public
@param        $liveUpdateURL - live update url address
@return        boolean
436209
public function setLiveUpdateURL($liveUpdateURL = 'https://secure.epayment.ro/order/lu.php')
    {
        if (!is_string($liveUpdateURL)) {  //invalid data type
            return false;
        }

        if (empty($liveUpdateURL)) {   //empty string
            return false;
        }

        $this->liveUpdateURL = $liveUpdateURL; //everything is ok
        return true;
    }
150856
public function setUrl($url)
    {
        $this->urlAbsolute = preg_replace('#/$#', '', $url);

        if ($this->urlRelative === null) {
            $this->urlRelative = $this->urlAbsolute;
        }

        return $this;
    }
996335
public function setSuccessUrl($url)
    {
        $this->setField('SuccessUrl', $url);
        if (!$this->FailureUrl) {
            $this->setField('FailureUrl', $url);
        }

        return $this;
    }
1286383
public function setTargetUrl($url)
    {
        if (empty($url)) {
            throw new \InvalidArgumentException('Cannot redirect to an empty URL.');
        }

        $this->targetUrl = $url;

        $this->setContent(
            sprintf('<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url=%1$s" />

        <title>Redirecting to %1$s</title>
    </head>
    <body>
        Redirecting to <a href="%1$s">%1$s</a>.
    </body>
</html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')));

        $this->headers->set('Location', $url);

        return $this;
    }
1340145
public void setLiveWebPrefix(String liveWebPrefix) {
		if (liveWebPrefix == null || liveWebPrefix.isEmpty()) {
			this.liveWebRedirector = null;
		}

		this.liveWebRedirector = new DefaultLiveWebRedirector(liveWebPrefix);
	}
1024111
public static function setUrl($url) {

		if(false === is_string($url) && false === $url instanceof URLParser) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or instance of sFire\\Utils\\URLParser, "%s" given', __METHOD__, gettype($url)), E_USER_ERROR);
		}

		if(true === is_string($url)) {
			$url = new URLParser($url);
		}

		static :: $url = $url;
		return $url;
	}
138514
public function setPushUrl($name, $url, $oldUrl = null)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = $name;
        $this->arguments[] = '--push';
        $this->arguments[] = $url;
        if ($oldUrl) {
            $this->arguments[] = $oldUrl;
        }
        return $this;
    }
986828
public function updateUrl()
    {
        $this->url = '';
        $this->generateCompleteUrl($this);
        $this->url = $this->url;

        //if (strlen($this->slug) > 1) {
        //    $this->url .= "/{$this->slug}";
        //}
        if (strlen($this->slug) > 1) {
            $this->url .= (is_slug_url($this->slug) ? "" : "/") . $this->slug;
        }

        return $this;
    }
250664
public function setPreview( $url )
	{
		if ( $url == $this->getPreview() ) { return; }

		$this->_values['preview'] = (string) $url;
		$this->setModified();
	}
466854
public function refreshOverseaUrl($url)
    {
        $urls = is_array($url) ? $url : func_get_args();

        return $this->request($urls, 'urls', 'RefreshCdnOverSeaUrl');
    }
686755
protected function generateUpdateUrl()
    {
        $request = System::getContainer()->get('request_stack')->getCurrentRequest();

        $configPicker = new PickerConfig(
            'cca_tree',
            [
                'fieldType'    => $this->fieldType,
                'sourceName'   => $this->sourceName,
                'modelId'      => ModelId::fromModel($this->dataContainer->getModel())->getSerialized(),
                'orderField'   => $this->orderField,
                'propertyName' => $this->name
            ],
            $this->valueToWidget($this->value)
        );

        return System::getContainer()->get('router')->generate(
            'cca_dc_general_tree_update',
            [
                'picker' => $configPicker->cloneForCurrent((string) $request->query->get('context'))->urlEncode()
            ],
            UrlGenerator::ABSOLUTE_URL
        );
    }
1326132
public function processUpdateJobFromUrl($url, array $update = [ ], $report_email = false, $postback_url = false, array $options = [ ]) {
        return $this->processUpdateJob('url', $url, $update, $report_email, $postback_url, [ ], $options);
    }
931506
protected function set_url($url) {
        if ($url instanceof \moodle_url) {
            $url = $url->out(false);
        }
        $this->raw_set('url', $url);
    }
480779
public function setUrl(?string $url): void
	{
		if ($this->locale === null) {
			throw new InvalidArgumentException('Locale must be set before calling setUrl');
		}
		if ($this->isLink === null) {
			throw new InvalidArgumentException("'isLink' must be set before calling setUrl");
		}
		if (!$this->isLink && Strings::match($url, '/[^A-Za-z0-9_-]/')) {
			throw new InvalidArgumentException('URL contains invalid characters');
		}

		$completeUrl = !$this->isLink && $this->parent && $url !== null ?
			$this->parent->completeUrl . '/' . $url
			: $url;

		/* @var $repository PagesRepository */
		$repository = $this->getRepository();
		$page = $repository->getByUrl($completeUrl, $this->locale->name);
		if ($page !== null && $page !== $this) {
			throw new UniqueConstraintViolationException("Page with '$url' exists");
		}
		$this->url = $url;
	}
349279
protected function updateURLData()
    {
        $uri = substr($this->currentURL, strlen($this->baseURL));
        if (!trim($uri) || '/' == $uri) {
            $this->language = $this->defaultLanguage;
            $this->module = $this->defaultModule;
            $this->controller = $this->defaultController;
            $this->action = null;
            $this->calculateModulePath();
            return;
        }
        $language = explode('/', $uri, 2); // search for language
        if (in_array($language[0], $this->availableLanguages)) {
            $this->language = $language[0];
            $uri = $language[1];
        }

        $module = explode('/', $uri, 2); // search for module
        foreach ($this->modules as $mod => $details) {
            if (is_array($details) && $module[0] == $mod) {
                $this->applyModuleConfig($details);
                $this->module = $module[0];
                $uri = isset($module[1]) ? $module[1] : '';
                break;
            }
            if ($details == $module[0]) {
                $this->module = $module[0];
                $uri = isset($module[1]) ? $module[1] : '';
                break;
            }
        }
        $this->calculateModulePath();
        if (!trim($uri)) {
            $this->controller = $this->defaultController;
            $this->action = null;
            return;
        }
        unset($module);
        if ($uri[0] == '/') {
            $uri = substr($uri, 1); // remove slash from start.
        }

        if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) { // remove query part from url.
            $uri = substr($uri, 0, strlen($uri) - strlen($_SERVER['QUERY_STRING']) - 1);
        }
        if ('.html' == substr($uri, -5)) {
            $uri = substr($uri, 0, strlen($uri) - 5); // remove .html from the end.
        }

        // search for the route.
        $this->params = $_GET;
        foreach ($this->urlRoutes as $route => $defined) {
            $expression = is_numeric($route) ? '/^' . $defined . '$/' : '/^' . $route . '$/';
            $result = preg_match($expression, $uri, $matches);
            if (!$result) {
                $expression = is_numeric($route) ? '/^' . $defined . '\/(?<params>.*)$/' : '/^' . $route . '\/(?<params>.*)$/';
                $result = preg_match($expression, $uri, $matches);
            }
            if (!$result) {
                continue; //not matched
            }
            if ($this->debug) {
                $this->debug($uri . ' -- ' . $expression);
            }
            $this->_updateURLDataUsingMatches($matches, is_numeric($route) ? "" : $defined);
            break;
        }
        $_GET = $this->params;
    }
1022709
public function setUrl(HttpUrl $url)
    {
        //Remove the user and pass from the view url
        unset($url->user);
        unset($url->pass);

        $this->__url = $url;
        return $this;
    }
24053
public function setUrl($name, $url, $oldUrl = null)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = $name;
        $this->arguments[] = $url;
        if ($oldUrl) {
            $this->arguments[] = $oldUrl;
        }
        return $this;
    }