function contentType($path) { $asset = $this->environment->find($this->resolve($path)); if (!$asset) { throw new \Exception("Asset '{$path}' not found."); } return $asset->getContentType(); }