original_string: protected final function resolveResource($file)
  	{
  		if(0 === strpos($file, './') || 0 === strpos($file, '../'))
  		{
  			$file = rtrim(dirname($this->getResource()), '/\\') . '/' . $file;
  		}
  		elseif(!preg_match("'^/|(?:[^:]+://)|(?:[a-z]:[\\\\/])'i", $file))
  		{
  			$dir = rtrim(dirname($this->getResource()), '/\\');
  			$file = $dir . '/' . ltrim($file, '/\\');
  		}
  		
  		return (string)$file;
  	}
code: protected final function resolveResource($file)
  	{
  		if(0 === strpos($file, './') || 0 === strpos($file, '../'))
  		{
  			$file = rtrim(dirname($this->getResource()), '/\\') . '/' . $file;
  		}
  		elseif(!preg_match("'^/|(?:[^:]+://)|(?:[a-z]:[\\\\/])'i", $file))
  		{
  			$dir = rtrim(dirname($this->getResource()), '/\\');
  			$file = $dir . '/' . ltrim($file, '/\\');
  		}
  		
  		return (string)$file;
  	}
code_tokens: protected final function resolveResource ( $ file ) { if ( 0 === strpos ( $ file , './' ) || 0 === strpos ( $ file , '../' ) ) { $ file = rtrim ( dirname ( $ this -> getResource ( ) ) , '/\\' ) . '/' . $ file ; } elseif ( ! preg_match ( "'^/|(?:[^:]+://)|(?:[a-z]:[\\\\/])'i" , $ file ) ) { $ dir = rtrim ( dirname ( $ this -> getResource ( ) ) , '/\\' ) ; $ file = $ dir . '/' . ltrim ( $ file , '/\\' ) ; } return ( string ) $ file ; }
docstring: Resolve a path considering the location of the view if a relative path is given.
  
  @param string $file The path to be resolved.
  @return string
docstring_tokens: Resolve a path considering the location of the view if a relative path is given .