blob: 85738f65811c90f27ed25de060fc0869e0207416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
namespace Lightscale\LaralightAssets;
use Illuminate\Contracts\Support\Htmlable;
abstract class File implements Htmlable
{
private string $url;
public function __construct(string $path)
{
$this->setUrl($path);
}
protected function setUrl(string $url): void
{
$this->url = $url;
}
public function getUrl(): string
{
return $this->url;
}
public function hash(): string
{
$class = static::class;
return md5("{$class}|{$this->url}");
}
abstract public function toHtml(): string;
}
|