public function prepareForController($assets, $type)
	{
		$controller_url = $this->cdn ? $this->cdn . '/' : '/';
		$controller_url .= $this->route . '/' . $type;
		$controller_url .= '?c=' . urlencode($this->name);
		
		$links = array();
		
		foreach ($assets as &$asset) {
			$attributes = $asset['attributes'];
			unset($asset['attributes']);
			unset($asset['ext']);
			
			if (empty($asset['dependencies'])) {
				unset($asset['dependencies']);
			}
			
			if (!$this->combine) {
				$url = $controller_url . '&files=' . base64_encode(json_encode(array($asset)));
				$url .= $this->version ? '&v=' . $this->version : '';
				
				if ('style' == $type) {
					$links[] = HTML::style($url, $attributes);
				}
				else {
					$links[] = HTML::script($url, $attributes);
				}
			}
		}
		
		if ($this->combine) {
			$url = $controller_url . '&files=' . base64_encode(json_encode($assets));
			$url .= $this->version ? '&v=' . $this->version : '';
			
			if ('style' == $type) {
				$links[] = HTML::style($url);
			}
			else {
				$links[] = HTML::script($url);
			}
		}
		
		return implode('', $links);
	}