/**
* Get the file path
*
* @param boolean $resolvePath Whether need to search for a real paths
*
* @return string The resolved path if resolved, else an empty string.
*
* @since 4.0.0
*/
public function getUri($resolvePath = true) : string
{
$path = $this->uri;
if ($resolvePath && $path) {
switch (pathinfo($path, PATHINFO_EXTENSION)) {
case 'js':
$path = $this->resolvePath($path, 'script');
break;
case 'css':
$path = $this->resolvePath($path, 'stylesheet');
break;
default:
break;
}
}
return $path ?? '';
}