original_string: 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);
  	}
code: 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);
  	}
code_tokens: 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 ) ; }
docstring: Prepare the given assets to be rendered to call the Casset controller
  and return the HTML link to that resource.
  
  @param array  $assets
  @param string $type
  
  @return string
docstring_tokens: Prepare the given assets to be rendered to call the Casset controller and return the HTML link to that resource .