diff options
Diffstat (limited to 'src/File.php')
| -rw-r--r-- | src/File.php | 22 | 
1 files changed, 21 insertions, 1 deletions
| diff --git a/src/File.php b/src/File.php index 3e64938..b2c52fc 100644 --- a/src/File.php +++ b/src/File.php @@ -2,7 +2,27 @@  namespace Lightscale\LaralightAssets; -class File +use Illuminate\Contracts\Support\Htmlable; + +abstract class File implements Htmlable  { +    private string $path; + +    protected function setPath(string $path): void +    { +        $this->path = $path; +    } + +    public function getPath(): string +    { +        return $this->path; +    } + +    public function hash(): string +    { +        $class = static::class; +        return md5("{$class}|{$this->path}"); +    } +    abstract public function toHtml(): string  } | 
