public function cleanLink($link)
	{
		$link = strtolower(preg_replace(
					array('#[\\s-]+#', '#[^A-Za-z0-9/ -]+#'),
					array('-', ''),
				    $this->cleanString(urldecode($link))
		));

		$link = preg_replace('/\/+/', '/', $link);
		$link = preg_replace('/-+/', '-', $link);
		
		return $link;
	}
public function cleanLink($link)
	{
		$link = strtolower(preg_replace(
					array('#[\\s-]+#', '#[^A-Za-z0-9/ -]+#'),
					array('-', ''),
				    $this->cleanString(urldecode($link))
		));

		$link = preg_replace('/\/+/', '/', $link);
		$link = preg_replace('/-+/', '-', $link);
		
		return $link;
	}
public function cleanLink ( $ link ) { $ link = strtolower ( preg_replace ( array ( '#[\\s-]+#' , '#[^A-Za-z0-9/ -]+#' ) , array ( '-' , '' ) , $ this -> cleanString ( urldecode ( $ link ) ) ) ) ; $ link = preg_replace ( '/\/+/' , '/' , $ link ) ; $ link = preg_replace ( '/-+/' , '-' , $ link ) ; return $ link ; }
Cleans a link to allow only good characters

@param string $link
Cleans a link to allow only good characters