Set whether to use relative links.

@param bool $relative
325192
public function setRelativeLinks($relative = true)
    {
        // This is not possible on Windows.
        if (OsUtil::isWindows()) {
            $relative = false;
        }
        $this->relative = $relative;
    }
453184
public function setJson($value = FALSE)
    {
        if (!$value) {
            $this->isJson = FALSE;
        } else {
            $this->isJson = TRUE;
        }
    }
1206568
public void setRelativeTo(String relativeTo) {

        m_relativeTo = relativeTo;
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_relativeTo)) {
            m_relativeTo = null;
        } else {
            if (!m_relativeTo.startsWith("/")) {
                m_relativeTo = "/" + m_relativeTo;
            }
            if (!m_relativeTo.endsWith("/")) {
                m_relativeTo += "/";
            }
        }
    }
660194
public static function setLinks(array $links, bool $replace_existing=false) :void {
		// if we want to purge existing links
		!$replace_existing ?: self::$_links = []; 
		// href is the key for storing links
		foreach($links as $href_or_index => $attributes_or_href) {
			// if arguments are provided
			if(is_array($attributes_or_href)) {
				// if we have a stylesheet
				if(
					// if a rel is set, and it's not a stylesheet
					!array_key_exists('rel',$attributes_or_href) || 
					// and it's not a stylesheet
					$attributes_or_href['rel'] == 'stylesheet'
				) {
					// also rewrite the path of assets that used relative shortcuts
					$attributes_or_href['href'] 	= self::getPublicAssetPath($href_or_index,'Css');
					// force the type
					$attributes_or_href['type'] 	= 'text/css';
					// force the rel
					$attributes_or_href['rel'] 		= 'stylesheet';
					// if the media key is implicit
					array_key_exists('media', $attributes_or_href) ?: $attributes_or_href['media'] = 'all';
					// push the slightly alternated stylesheet
					self::$_links[$href_or_index] = $attributes_or_href;
				}
				// otherwize we don't know what we're dealing with
				else {
					// just set its href
					$attributes_or_href['href'] = $href_or_index;
					// push that link and its attributes
					self::$_links[$href_or_index] = $attributes_or_href;
				}
			}
			// else only an href is provided, we assume it is a stylesheet
			else {
				// push that link alone
				self::$_links[$attributes_or_href] = [
					// we assume it is a generic all media stylesheet
					'rel'	=>'stylesheet',
					'type'	=>'text/css',
					'media'	=>'all',
					// and we set its href
					'href'	=>self::getPublicAssetPath($attributes_or_href, 'Css')
				];
			}
		}
	}
1367748
public function addPath($relativePath)
    {
        if (!$relativePath || $relativePath == '/') {
            return $this;
        }

        // Add a leading slash if needed
        if ($relativePath[0] != '/') {
            $relativePath = '/' . $relativePath;
        }

        return $this->setPath(str_replace('//', '/', $this->getPath() . $relativePath));
    }
511579
public function RelativeLink($action = null)
    {
        return Controller::join_links(
            Director::baseURL(),
            $this->Link($action)
        );
    }
551626
public function setSuperUserAccess($bool = true)
    {
        $this->hasSuperUserAccess = (bool) $bool;

        if ($bool) {
            $this->makeSureLoginNameIsSet();
        } else {
            $this->resetSites();
        }
    }
1163707
public function setBasePath($path, $publicPath = true)
    {
        $this->basePath   = $path;
        $this->publicPath = $publicPath;
    }
1209135
public function setStatic($static)
    {
        if ($static === true) {
            $this->addModifier(Modifiers::MODIFIER_STATIC);
        } else {
            $this->removeModifier(Modifiers::MODIFIER_STATIC);
        }
    }
1186485
public function setOverlay($overlay = FALSE) {
		if (!is_bool($overlay)) {
			return false;
		}

		$this->_overlay = $overlay;
		return true;
	}
93304
public void setSourceRelative (boolean relative)
    {
        if (_sourceRelative != relative) {
            _sourceRelative = relative;
            AL10.alSourcei(_id, AL10.AL_SOURCE_RELATIVE, relative ? AL10.AL_TRUE : AL10.AL_FALSE);
        }
    }
175026
public function setIsTransactional(bool $isTransactional) : void
    {
        if ($this->isConnected()) {
            if (!$isTransactional && $this->isTransactional) {
                $this->connection->commit();
            } elseif ($isTransactional && !$this->isTransactional) {
                $this->beginTransaction();
            }
        }

        $this->isTransactional = $isTransactional;
    }
181297
public function addRelativeLocation($relative_path, array $contents = array())
    {
        $location = $this->newInstance();

        $location->setBasePath($this->base_path.'/'.$relative_path);

        if ($this->base_url) {
            $location->setBaseURL($this->base_url.'/'.$relative_path);
        }

        return $contents ? $location->defineContents($contents) : $location;
    }
664273
public function setLinks(array $links)
    {
        foreach ($links as &$href) {
            $href = ['href' => $href];
        }

        $this->links = $links;
    }
43355
public function RelativeLink($action = null)
    {
        if ($this->owner->ParentID && SiteConfig::current_site_config()->nested_urls) {
            $parent = $this->owner->Parent();
            // If page is removed select parent from version history (for archive page view)
            if ((!$parent || !$parent->exists()) && !$this->owner->isOnDraft()) {
                $parent = Versioned::get_latest_version($this->owner->ClassName, $this->owner->ParentID);
            }
            $base = $parent->RelativeLink($this->owner->URLSegment);
        } elseif (!$action && $this->owner->URLSegment == RootURLController::get_homepage_link()) {
            // Unset base for root-level homepages.
            // Note: Homepages with action parameters (or $action === true)
            // need to retain their URLSegment.
            $base = null;
        } else {
            $base = $this->owner->URLSegment;
        }

        $this->owner->extend('updateRelativeLink', $base, $action);

        // Legacy support: If $action === true, retain URLSegment for homepages,
        // but don't append any action
        if ($action === true) {
            $action = null;
        }

        return Controller::join_links($base, '/', $action);
    }
268215
public function setLinkPath($linkPath) {
        $this->linkPath = (substr($linkPath,0,1) != '/') ? '/'.$linkPath:$linkPath;
        if(substr($this->linkPath,-1) != '/') $this->linkPath .= '/';
    }
802694
public function addPath($relativePath)
    {
        if ($relativePath != '/' &&
            is_string($relativePath) &&
            strlen($relativePath) > 0
        ) {
            // Add a leading slash if needed
            if ($relativePath[0] !== '/' &&
                substr($this->path, -1, 1) !== '/'
            ) {
                $relativePath = '/' . $relativePath;
            }

            $this->setPath($this->path . $relativePath);
        }
    }