diff options
Diffstat (limited to 'src/File.php')
| -rw-r--r-- | src/File.php | 19 | 
1 files changed, 12 insertions, 7 deletions
| diff --git a/src/File.php b/src/File.php index b2c52fc..85738f6 100644 --- a/src/File.php +++ b/src/File.php @@ -6,23 +6,28 @@ use Illuminate\Contracts\Support\Htmlable;  abstract class File implements Htmlable  { -    private string $path; +    private string $url; -    protected function setPath(string $path): void +    public function __construct(string $path)      { -        $this->path = $path; +        $this->setUrl($path);      } -    public function getPath(): string +    protected function setUrl(string $url): void      { -        return $this->path; +        $this->url = $url; +    } + +    public function getUrl(): string +    { +        return $this->url;      }      public function hash(): string      {          $class = static::class; -        return md5("{$class}|{$this->path}"); +        return md5("{$class}|{$this->url}");      } -    abstract public function toHtml(): string +    abstract public function toHtml(): string;  } | 
