diff options
| author | Sam Light <sam@lightscale.co.uk> | 2025-03-31 00:49:13 +0100 | 
|---|---|---|
| committer | Sam Light <samlight1994@gmail.com> | 2025-03-31 00:49:13 +0100 | 
| commit | 28e2f2c50c902d6ea09b2d6941c9e71ea07b23eb (patch) | |
| tree | 92a7cf5d38f01738ae88e161147a5770f673f105 /src/File.php | |
| parent | d80d1d27c3a5dcea6f341e0bc29653acfde6b5ea (diff) | |
Created files for files to load
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  }  | 
