/**
* To create the shared assets dir
* Base on the config file
* @return string
*/
private function getPublicAssetsDir()
{
$path = $this->controller->getConfig("views.publicAssetsDir");
// Shared assets is from URL
if (preg_match("/^http(s)?:\\/\\//", $path)) {
return $path;
}
// Shared assets starts from the root
return $this->controller->getSiteUrl() . "/" . preg_replace("/^\\//", "", str_replace(Env::getFrontControllerPath(), "", $path ?: Env::getPublicAssetsPath()));
}