public function getFilePath( string$filePath, string$path=null ):string
	{
		if( !isset($this->basePath) )
			{ throw new \Exception('BasePath musbe set.'); }

		if( !strlen($filePath) )
			{ throw new \Exception('FilePath cannot be empty.'); }

		if( '/'===$filePath{0} ){
			if( is_null($path) )
				{ return $filePath; }
			else
				{ return $this->basePath.$filePath; }
		}else{
			if( !strlen($path) )
				{ return $this->basePath.'/'.$filePath; }
			elseif( '/'===substr($path,-1) )
				{ return $path.$filePath; }
			else
				{ return $path.'/'.$filePath; }
		}

	}
public function getFilePath( string$filePath, string$path=null ):string
	{
		if( !isset($this->basePath) )
			{ throw new \Exception('BasePath musbe set.'); }

		if( !strlen($filePath) )
			{ throw new \Exception('FilePath cannot be empty.'); }

		if( '/'===$filePath{0} ){
			if( is_null($path) )
				{ return $filePath; }
			else
				{ return $this->basePath.$filePath; }
		}else{
			if( !strlen($path) )
				{ return $this->basePath.'/'.$filePath; }
			elseif( '/'===substr($path,-1) )
				{ return $path.$filePath; }
			else
				{ return $path.'/'.$filePath; }
		}

	}
public function getFilePath ( string $ filePath , string $ path = null ) : string { if ( ! isset ( $ this -> basePath ) ) { throw new \ Exception ( 'BasePath musbe set.' ) ; } if ( ! strlen ( $ filePath ) ) { throw new \ Exception ( 'FilePath cannot be empty.' ) ; } if ( '/' === $ filePath { 0 } ) { if ( is_null ( $ path ) ) { return $ filePath ; } else { return $ this -> basePath . $ filePath ; } } else { if ( ! strlen ( $ path ) ) { return $ this -> basePath . '/' . $ filePath ; } elseif ( '/' === substr ( $ path , - 1 ) ) { return $ path . $ filePath ; } else { return $ path . '/' . $ filePath ; } } }
Getting the real file path of the HTSL file by relative path.

@internal

@access public

@param  string      $filePath
@param  string|null $path

@return string
Getting the real file path of the HTSL file by relative path .