Storage.php 328 B

12345678910111213141516
  1. <?php
  2. namespace thans\filesystem\traits;
  3. trait Storage
  4. {
  5. public function getUrl(string $path)
  6. {
  7. if (strpos($path, '/') === 0) {
  8. return $path;
  9. }
  10. return isset($this->config['url']) && $this->config['url'] ? $this->config['url'].DIRECTORY_SEPARATOR.$path
  11. : $path;
  12. }
  13. }