type; } /** * Get asset url. * * @return string */ public function getUrl() { return $this->url; } /** * Set asset url. * * @param string $url */ public function setUrl($url) { $this->url = $url; } /** * Get asset content and apply filters. * * @param mixed $filter * * @return string */ public function getContent($filter = null) { if (!$this->loaded) { $this->load($filter); } if ($filter) { $asset = clone $this; $filter->filterContent($asset); return $asset->getContent(); } return $this->content; } /** * Set asset content. * * @param string $content */ public function setContent($content) { $this->content = $content; } /** * Load asset and apply filters. * * @param string $content * @param object $filter */ protected function doLoad($content, $filter = null) { $this->content = $content; if ($filter) { $filter->filterLoad($this); } $this->loaded = true; } }