public function PathAndUri(){

		$evald_path = $this->getPath();

		if( $evald_path ){

			$import_dirs = array();

			if( Less_Environment::isPathRelative($evald_path) ){
				//if the path is relative, the file should be in the current directory
				$import_dirs[ $this->currentFileInfo['currentDirectory'] ] = $this->currentFileInfo['uri_root'];

			}else{
				//otherwise, the file should be relative to the server root
				$import_dirs[ $this->currentFileInfo['entryPath'] ] = $this->currentFileInfo['entryUri'];

				//if the user supplied entryPath isn't the actual root
				$import_dirs[ $_SERVER['DOCUMENT_ROOT'] ] = '';

			}

			// always look in user supplied import directories
			$import_dirs = array_merge( $import_dirs, Less_Parser::$options['import_dirs'] );


			foreach( $import_dirs as $rootpath => $rooturi){
				if( is_callable($rooturi) ){
					list($path, $uri) = call_user_func($rooturi, $evald_path);
					if( is_string($path) ){
						$full_path = $path;
						return array( $full_path, $uri );
					}
				}elseif( !empty($rootpath) ){

					$path = rtrim($rootpath,'/\\').'/'.ltrim($evald_path,'/\\');

					if( file_exists($path) ){
						$full_path = Less_Environment::normalizePath($path);
						$uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path));
						return array( $full_path, $uri );
					} elseif( file_exists($path.'.less') ){
						$full_path = Less_Environment::normalizePath($path.'.less');
						$uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path.'.less'));
						return array( $full_path, $uri );
					}
				}
			}
		}
	}
public function PathAndUri(){

		$evald_path = $this->getPath();

		if( $evald_path ){

			$import_dirs = array();

			if( Less_Environment::isPathRelative($evald_path) ){
				//if the path is relative, the file should be in the current directory
				$import_dirs[ $this->currentFileInfo['currentDirectory'] ] = $this->currentFileInfo['uri_root'];

			}else{
				//otherwise, the file should be relative to the server root
				$import_dirs[ $this->currentFileInfo['entryPath'] ] = $this->currentFileInfo['entryUri'];

				//if the user supplied entryPath isn't the actual root
				$import_dirs[ $_SERVER['DOCUMENT_ROOT'] ] = '';

			}

			// always look in user supplied import directories
			$import_dirs = array_merge( $import_dirs, Less_Parser::$options['import_dirs'] );


			foreach( $import_dirs as $rootpath => $rooturi){
				if( is_callable($rooturi) ){
					list($path, $uri) = call_user_func($rooturi, $evald_path);
					if( is_string($path) ){
						$full_path = $path;
						return array( $full_path, $uri );
					}
				}elseif( !empty($rootpath) ){

					$path = rtrim($rootpath,'/\\').'/'.ltrim($evald_path,'/\\');

					if( file_exists($path) ){
						$full_path = Less_Environment::normalizePath($path);
						$uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path));
						return array( $full_path, $uri );
					} elseif( file_exists($path.'.less') ){
						$full_path = Less_Environment::normalizePath($path.'.less');
						$uri = Less_Environment::normalizePath(dirname($rooturi.$evald_path.'.less'));
						return array( $full_path, $uri );
					}
				}
			}
		}
	}
public function PathAndUri ( ) { $ evald_path = $ this -> getPath ( ) ; if ( $ evald_path ) { $ import_dirs = array ( ) ; if ( Less_Environment :: isPathRelative ( $ evald_path ) ) { //if the path is relative, the file should be in the current directory $ import_dirs [ $ this -> currentFileInfo [ 'currentDirectory' ] ] = $ this -> currentFileInfo [ 'uri_root' ] ; } else { //otherwise, the file should be relative to the server root $ import_dirs [ $ this -> currentFileInfo [ 'entryPath' ] ] = $ this -> currentFileInfo [ 'entryUri' ] ; //if the user supplied entryPath isn't the actual root $ import_dirs [ $ _SERVER [ 'DOCUMENT_ROOT' ] ] = '' ; } // always look in user supplied import directories $ import_dirs = array_merge ( $ import_dirs , Less_Parser :: $ options [ 'import_dirs' ] ) ; foreach ( $ import_dirs as $ rootpath => $ rooturi ) { if ( is_callable ( $ rooturi ) ) { list ( $ path , $ uri ) = call_user_func ( $ rooturi , $ evald_path ) ; if ( is_string ( $ path ) ) { $ full_path = $ path ; return array ( $ full_path , $ uri ) ; } } elseif ( ! empty ( $ rootpath ) ) { $ path = rtrim ( $ rootpath , '/\\' ) . '/' . ltrim ( $ evald_path , '/\\' ) ; if ( file_exists ( $ path ) ) { $ full_path = Less_Environment :: normalizePath ( $ path ) ; $ uri = Less_Environment :: normalizePath ( dirname ( $ rooturi . $ evald_path ) ) ; return array ( $ full_path , $ uri ) ; } elseif ( file_exists ( $ path . '.less' ) ) { $ full_path = Less_Environment :: normalizePath ( $ path . '.less' ) ; $ uri = Less_Environment :: normalizePath ( dirname ( $ rooturi . $ evald_path . '.less' ) ) ; return array ( $ full_path , $ uri ) ; } } } } }
Using the import directories, get the full absolute path and uri of the import

@param Less_Tree_Import $evald
Using the import directories get the full absolute path and uri of the import