Timber\URLHelper::file_system_to_url PHP Method

file_system_to_url() public static method

public static file_system_to_url ( string $fs )
$fs string
    public static function file_system_to_url($fs)
    {
        $relative_path = self::get_rel_path($fs);
        $home = home_url('/' . $relative_path);
        return $home;
    }

Usage Example

示例#1
0
文件: Image.php 项目: mrgrain/timber
 /**
  * @internal
  * @param string $file_path
  */
 protected function init_with_file_path($file_path)
 {
     $url = URLHelper::file_system_to_url($file_path);
     $this->abs_url = $url;
     $this->file_loc = $file_path;
     $this->file = $file_path;
 }
All Usage Examples Of Timber\URLHelper::file_system_to_url