protected function lookup($localName, $namespace = '', array $import = [])
	{
		if($localName == '')
		{
			return $localName;
		}
		
		switch(strtolower($localName))
		{
			case 'bool':
			case 'int':
			case 'float':
			case 'string':
			case 'array':
			case 'callable':
				return strtolower($localName);
				break;
		}
		
		if($localName[0] == '\\')
		{
			return ltrim($localName, '\\');
		}
		
		if(false === (strpos($localName, '\\')))
		{
			$n = strtolower($localName);
			
			return isset($import[$n]) ? $import[$n] : ltrim($namespace . '\\' . $localName, '\\');
		}
		
		$parts = explode('\\', $localName, 2);
		$alias = strtolower($parts[0]);
		
		if(isset($import[$alias]))
		{
			return ltrim($import[$alias] . '\\' . $parts[1], '\\');
		}
		
		return ltrim($namespace . '\\' . $localName, '\\');
	}
protected function lookup($localName, $namespace = '', array $import = [])
	{
		if($localName == '')
		{
			return $localName;
		}
		
		switch(strtolower($localName))
		{
			case 'bool':
			case 'int':
			case 'float':
			case 'string':
			case 'array':
			case 'callable':
				return strtolower($localName);
				break;
		}
		
		if($localName[0] == '\\')
		{
			return ltrim($localName, '\\');
		}
		
		if(false === (strpos($localName, '\\')))
		{
			$n = strtolower($localName);
			
			return isset($import[$n]) ? $import[$n] : ltrim($namespace . '\\' . $localName, '\\');
		}
		
		$parts = explode('\\', $localName, 2);
		$alias = strtolower($parts[0]);
		
		if(isset($import[$alias]))
		{
			return ltrim($import[$alias] . '\\' . $parts[1], '\\');
		}
		
		return ltrim($namespace . '\\' . $localName, '\\');
	}
protected function lookup ( $ localName , $ namespace = '' , array $ import = [ ] ) { if ( $ localName == '' ) { return $ localName ; } switch ( strtolower ( $ localName ) ) { case 'bool' : case 'int' : case 'float' : case 'string' : case 'array' : case 'callable' : return strtolower ( $ localName ) ; break ; } if ( $ localName [ 0 ] == '\\' ) { return ltrim ( $ localName , '\\' ) ; } if ( false === ( strpos ( $ localName , '\\' ) ) ) { $ n = strtolower ( $ localName ) ; return isset ( $ import [ $ n ] ) ? $ import [ $ n ] : ltrim ( $ namespace . '\\' . $ localName , '\\' ) ; } $ parts = explode ( '\\' , $ localName , 2 ) ; $ alias = strtolower ( $ parts [ 0 ] ) ; if ( isset ( $ import [ $ alias ] ) ) { return ltrim ( $ import [ $ alias ] . '\\' . $ parts [ 1 ] , '\\' ) ; } return ltrim ( $ namespace . '\\' . $ localName , '\\' ) ; }
Lookup a fully qualified name in the given namespace considering imports.

@param string $localName
@param string $namespace
@param array<string, string> $import
@return string
Lookup a fully qualified name in the given namespace considering imports .