public function prepend($asset)
	{
		// More than one asset
		if(is_array($asset))
		{
			foreach(array_reverse($asset) as $a)
				$this->prepend($a);
		}

		// Collection
		elseif(isset($this->collections[$asset]))
			$this->prepend($this->collections[$asset]);

		// JavaScript asset
		elseif(preg_match($this->js_regex, $asset))
			$this->prependJs($asset);

		// CSS asset
		elseif(preg_match($this->css_regex, $asset))
			$this->prependCss($asset);

		return $this;
	}
public function prepend($asset)
	{
		// More than one asset
		if(is_array($asset))
		{
			foreach(array_reverse($asset) as $a)
				$this->prepend($a);
		}

		// Collection
		elseif(isset($this->collections[$asset]))
			$this->prepend($this->collections[$asset]);

		// JavaScript asset
		elseif(preg_match($this->js_regex, $asset))
			$this->prependJs($asset);

		// CSS asset
		elseif(preg_match($this->css_regex, $asset))
			$this->prependCss($asset);

		return $this;
	}
public function prepend ( $ asset ) { // More than one asset if ( is_array ( $ asset ) ) { foreach ( array_reverse ( $ asset ) as $ a ) $ this -> prepend ( $ a ) ; } // Collection elseif ( isset ( $ this -> collections [ $ asset ] ) ) $ this -> prepend ( $ this -> collections [ $ asset ] ) ; // JavaScript asset elseif ( preg_match ( $ this -> js_regex , $ asset ) ) $ this -> prependJs ( $ asset ) ; // CSS asset elseif ( preg_match ( $ this -> css_regex , $ asset ) ) $ this -> prependCss ( $ asset ) ; return $ this ; }
Add an asset or a collection of assets to the beginning of the queue.

It automatically detects the asset type (JavaScript, CSS or collection).
You may prepend more than one asset passing an array as argument.

@param  mixed   $asset
@return Manager
Add an asset or a collection of assets to the beginning of the queue .