![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/metras.v32.1/vendor/roots/acorn/src/Acorn/Assets/ |
<?php namespace Roots\Acorn\Assets; use Illuminate\Support\Str; use Roots\Acorn\Assets\Contracts\Asset as AssetContract; class Asset implements AssetContract { /** @var string */ protected $uri; /** @var string */ protected $path; /** * Get asset from manifest * * @param string $path Local path * @param string $uri Remote URI */ public function __construct(string $path, string $uri) { $this->path = Str::before($path, '?'); $this->uri = $uri; } /** {@inheritdoc} */ public function uri() : string { return $this->uri; } /** {@inheritdoc} */ public function path() : string { return $this->path; } /** {@inheritdoc} */ public function exists() : bool { return file_exists($this->path()); } /** {@inheritdoc} */ public function contents() : string { if (! $this->exists()) { return false; } return file_get_contents($this->path()); } /** {@inheritdoc} */ public function __toString() { return $this->uri(); } }