framework/web/CAssetManager.php
public function getPublishedUrl($path,$hashByName=false)
	{
		if(isset($this->_published[$path]))
			return $this->_published[$path];
		if(is_string($path) && ($path=realpath($path))!==false)
		{
			$base=$this->getBaseUrl().'/'.$this->generatePath($path,$hashByName);
			return is_file($path) ? $base.'/'.basename($path) : $base;
		}
		else
			return false;
	}
public function getPublishedUrl($path,$hashByName=false)
	{
		if(isset($this->_published[$path]))
			return $this->_published[$path];
		if(is_string($path) && ($path=realpath($path))!==false)
		{
			$base=$this->getBaseUrl().'/'.$this->generatePath($path,$hashByName);
			return is_file($path) ? $base.'/'.basename($path) : $base;
		}
		else
			return false;
	}
public function getPublishedUrl ( $ path , $ hashByName = false ) { if ( isset ( $ this -> _published [ $ path ] ) ) return $ this -> _published [ $ path ] ; if ( is_string ( $ path ) && ( $ path = realpath ( $ path ) ) !== false ) { $ base = $ this -> getBaseUrl ( ) . '/' . $ this -> generatePath ( $ path , $ hashByName ) ; return is_file ( $ path ) ? $ base . '/' . basename ( $ path ) : $ base ; } else return false ; }
Returns the URL of a published file path.
This method does not perform any publishing. It merely tells you
if the file path is published, what the URL will be to access it.
@param string $path directory or file path being published
@param boolean $hashByName whether the published directory should be named as the hashed basename.
If false, the name will be the hash taken from dirname of the path being published and path mtime.
Defaults to false. Set true if the path being published is shared among
different extensions.
@return string the published URL for the file or directory. False if the file or directory does not exist.
Returns the URL of a published file path . This method does not perform any publishing . It merely tells you if the file path is published what the URL will be to access it .