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