public function renderAssets(&$content)
	{
		$this->prepareAssets();
		$js = $this->renderJs();
		$css = $this->renderCss();
		$bodyJs = $this->renderJs(self::ON_BODY);
		if(!empty($css))
		{
			if(strpos($content, "</head>")>0)
				$content = str_replace("</head>","####replace-css-here####</head>",$content);
			else
				$content = "####replace-css-here####".$content;
			$content = str_replace("####replace-css-here####",$css,$content);
		}
		if(!empty($js))
		{
			if(strpos($content, "</body>")>0)
				$content = str_replace("</body>","####replace-js-here####</body>",$content);
			else
				$content .= "####replace-js-here####";
			$content = str_replace("####replace-js-here####",$js,$content);
		}
                
		if(!empty($bodyJs))
		{
			if(strpos($content, "</body>")>0)
				$content = str_replace("</body>","####replace-js-here####</body>",$content);
			else
				$content .= "####replace-js-here####";
			$content = str_replace("####replace-js-here####",$bodyJs,$content);
		}
                
		return $content;
	}
public function renderAssets(&$content)
	{
		$this->prepareAssets();
		$js = $this->renderJs();
		$css = $this->renderCss();
		$bodyJs = $this->renderJs(self::ON_BODY);
		if(!empty($css))
		{
			if(strpos($content, "</head>")>0)
				$content = str_replace("</head>","####replace-css-here####</head>",$content);
			else
				$content = "####replace-css-here####".$content;
			$content = str_replace("####replace-css-here####",$css,$content);
		}
		if(!empty($js))
		{
			if(strpos($content, "</body>")>0)
				$content = str_replace("</body>","####replace-js-here####</body>",$content);
			else
				$content .= "####replace-js-here####";
			$content = str_replace("####replace-js-here####",$js,$content);
		}
                
		if(!empty($bodyJs))
		{
			if(strpos($content, "</body>")>0)
				$content = str_replace("</body>","####replace-js-here####</body>",$content);
			else
				$content .= "####replace-js-here####";
			$content = str_replace("####replace-js-here####",$bodyJs,$content);
		}
                
		return $content;
	}
public function renderAssets ( & $ content ) { $ this -> prepareAssets ( ) ; $ js = $ this -> renderJs ( ) ; $ css = $ this -> renderCss ( ) ; $ bodyJs = $ this -> renderJs ( self :: ON_BODY ) ; if ( ! empty ( $ css ) ) { if ( strpos ( $ content , "</head>" ) > 0 ) $ content = str_replace ( "</head>" , "####replace-css-here####</head>" , $ content ) ; else $ content = "####replace-css-here####" . $ content ; $ content = str_replace ( "####replace-css-here####" , $ css , $ content ) ; } if ( ! empty ( $ js ) ) { if ( strpos ( $ content , "</body>" ) > 0 ) $ content = str_replace ( "</body>" , "####replace-js-here####</body>" , $ content ) ; else $ content .= "####replace-js-here####" ; $ content = str_replace ( "####replace-js-here####" , $ js , $ content ) ; } if ( ! empty ( $ bodyJs ) ) { if ( strpos ( $ content , "</body>" ) > 0 ) $ content = str_replace ( "</body>" , "####replace-js-here####</body>" , $ content ) ; else $ content .= "####replace-js-here####" ; $ content = str_replace ( "####replace-js-here####" , $ bodyJs , $ content ) ; } return $ content ; }
begin rendering assets when response is valid and has been processed.
this is automatically triggered, so you don't need to trigger it manually
@param String $content
@return String $content content that has been preprocessed with registered assets and returned back
begin rendering assets when response is valid and has been processed . this is automatically triggered so you don t need to trigger it manually