getPublicAssetsPath() public static method

Get the public assets
public static getPublicAssetsPath ( ) : string
return string
コード例 #1
0
ファイル: View.php プロジェクト: voodoophp/voodoo
 /**
  * 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()));
 }