public function setRootPath($path) {

		$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

		if(!is_null($this->absoluteAssetsPath) && 0 !== strpos($this->absoluteAssetsPath, $path)) {
			throw new ApplicationException("'$path' not a parent of assets path '{$this->absoluteAssetsPath}'", ApplicationException::PATH_MISMATCH);
		}

		$this->rootPath = $path;
		$this->relativeAssetsPath = str_replace(DIRECTORY_SEPARATOR, '/', str_replace($this->rootPath, '', (string) $this->absoluteAssetsPath));

		return $this;

	}
public function setRootPath($path) {

		$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

		if(!is_null($this->absoluteAssetsPath) && 0 !== strpos($this->absoluteAssetsPath, $path)) {
			throw new ApplicationException("'$path' not a parent of assets path '{$this->absoluteAssetsPath}'", ApplicationException::PATH_MISMATCH);
		}

		$this->rootPath = $path;
		$this->relativeAssetsPath = str_replace(DIRECTORY_SEPARATOR, '/', str_replace($this->rootPath, '', (string) $this->absoluteAssetsPath));

		return $this;

	}
public function setRootPath ( $ path ) { $ path = rtrim ( $ path , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; if ( ! is_null ( $ this -> absoluteAssetsPath ) && 0 !== strpos ( $ this -> absoluteAssetsPath , $ path ) ) { throw new ApplicationException ( "'$path' not a parent of assets path '{$this->absoluteAssetsPath}'" , ApplicationException :: PATH_MISMATCH ) ; } $ this -> rootPath = $ path ; $ this -> relativeAssetsPath = str_replace ( DIRECTORY_SEPARATOR , '/' , str_replace ( $ this -> rootPath , '' , ( string ) $ this -> absoluteAssetsPath ) ) ; return $ this ; }
set root path of application
if an assetspath is set, the relative assets path is updated

@param string $path
@return Application
@throws ApplicationException
set root path of application if an assetspath is set the relative assets path is updated