public function getAssetUrl($path, $relative = false)
{
if (substr($path, 0, 1) !== '/') {
$path = '/' . $path;
}
if ($this->assetRoot !== null) {
$base = $this->assetRoot;
} else {
if ($relative) {
$base = $this->requests->getCurrentRequest()->getBaseUrl();
} else {
$base = $this->getRootUrl();
}
}
return $base . $path;
}