public function getSitePath($url, $match_scheme = true) {
		$ret = $this->analyzeUrl($url);

		if (!$ret || !$ret['path_within_site'] || ($ret['site_host'] !== $ret['host'])) {
			return false;
		}

		if ($match_scheme && ($ret['scheme'] !== $ret['site_scheme'])) {
			return false;
		}

		return new SitePath(implode('/', $ret['url_segments_within_site']));
	}
public function getSitePath($url, $match_scheme = true) {
		$ret = $this->analyzeUrl($url);

		if (!$ret || !$ret['path_within_site'] || ($ret['site_host'] !== $ret['host'])) {
			return false;
		}

		if ($match_scheme && ($ret['scheme'] !== $ret['site_scheme'])) {
			return false;
		}

		return new SitePath(implode('/', $ret['url_segments_within_site']));
	}
public function getSitePath ( $ url , $ match_scheme = true ) { $ ret = $ this -> analyzeUrl ( $ url ) ; if ( ! $ ret || ! $ ret [ 'path_within_site' ] || ( $ ret [ 'site_host' ] !== $ ret [ 'host' ] ) ) { return false ; } if ( $ match_scheme && ( $ ret [ 'scheme' ] !== $ ret [ 'site_scheme' ] ) ) { return false ; } return new SitePath ( implode ( '/' , $ ret [ 'url_segments_within_site' ] ) ) ; }
Get a site path object if the URL is within the Elgg site, or false if not.

@param string $url          URL, possibly within the site
@param bool   $match_scheme Require the URL scheme to match, e.g. http: won't match https:
@return SitePath|bool
Get a site path object if the URL is within the Elgg site or false if not .