'type'); /** * Return an instance of this class * * @return Script */ public static function factory() { return new Script; } /** * Render the script tag * * @see HTMLRender::render() */ protected function render() { $foutput = $soutput = ''; $mediapath = Route::get(static::$_media_path); $i = $j = 0; foreach (static::$_data as $value) { switch ($value['type']) { case 'file': $foutput .= HTML::script($mediapath->uri(array('file'=>$value['data']))); if ($i++) $foutput .= static::$_spacer; break; case 'stdin': $soutput .= sprintf("",$value['data']); if ($j++) $soutput .= static::$_spacer; break; default: throw new Kohana_Exception('Unknown style type :type',array(':type'=>$value['type'])); } } return $foutput.static::$_spacer.$soutput; } } ?>