public function renderJs($position=self::ON_HEAD)
	{
		$result = "";
		$js = $this->getJs($position);
		if(!empty($js))
		array_walk($js, function($value) use (&$result){
			$result .= '<script src="'.$value.'" type="text/javascript"></script>';
		});
		$custom = $this->getCustomJs($position);
		if(!empty($custom))
		{
			$customJs = '<script type="text/javascript" id="silex-assets-service-js-'.substr(md5(time()),0,5).'">';
			if($custom !== array())
				array_walk($custom, function($value) use (&$customJs){
					$customJs .= $value."\n";
				});
			$customJs .= "</script>";
			$result .= $customJs;
		}
		return $result;
	}
public function renderJs($position=self::ON_HEAD)
	{
		$result = "";
		$js = $this->getJs($position);
		if(!empty($js))
		array_walk($js, function($value) use (&$result){
			$result .= '<script src="'.$value.'" type="text/javascript"></script>';
		});
		$custom = $this->getCustomJs($position);
		if(!empty($custom))
		{
			$customJs = '<script type="text/javascript" id="silex-assets-service-js-'.substr(md5(time()),0,5).'">';
			if($custom !== array())
				array_walk($custom, function($value) use (&$customJs){
					$customJs .= $value."\n";
				});
			$customJs .= "</script>";
			$result .= $customJs;
		}
		return $result;
	}
public function renderJs ( $ position = self :: ON_HEAD ) { $ result = "" ; $ js = $ this -> getJs ( $ position ) ; if ( ! empty ( $ js ) ) array_walk ( $ js , function ( $ value ) use ( & $ result ) { $ result .= '<script src="' . $ value . '" type="text/javascript"></script>' ; } ) ; $ custom = $ this -> getCustomJs ( $ position ) ; if ( ! empty ( $ custom ) ) { $ customJs = '<script type="text/javascript" id="silex-assets-service-js-' . substr ( md5 ( time ( ) ) , 0 , 5 ) . '">' ; if ( $ custom !== array ( ) ) array_walk ( $ custom , function ( $ value ) use ( & $ customJs ) { $ customJs .= $ value . "\n" ; } ) ; $ customJs .= "</script>" ; $ result .= $ customJs ; } return $ result ; }
Begin processing registering Javascripts if available
@return String $result if app has javascript files, all registered javascripts will be converted as readable html script
Begin processing registering Javascripts if available