manifest = $manifest; $this->asset = basename($file); $this->dir = dirname($file) != '.' ? dirname($file) : ''; } public function __toString() { return $this->getUri(); } public function getUri() { $file = self::$dist . '/' . $this->dir . '/' . ($this->manifest ? $this->manifest->get($this->asset) : $this->asset); return get_template_directory_uri() . $file; } }