Minor fixes to statement, services and internal things

Many misc updates
This commit is contained in:
Deon George
2011-10-14 16:44:12 +11:00
parent 7876a16413
commit 56c11507f4
71 changed files with 2192 additions and 677 deletions

View File

@@ -30,25 +30,27 @@ class lnApp_Style extends HTMLRender {
* @see HTMLRender::render()
*/
protected function render() {
$output = '';
$foutput = $soutput = '';
$mediapath = Route::get(static::$_media_path);
$i = 0;
$i = $j = 0;
foreach (static::$_data as $value) {
if ($i++)
$output .= static::$_spacer;
switch ($value['type']) {
case 'file':
$output .= HTML::style($mediapath->uri(array('file'=>$value['data'])),
$foutput .= HTML::style($mediapath->uri(array('file'=>$value['data'])),
array('media'=>(! empty($value['media'])) ? $value['media'] : 'screen'),TRUE);
break;
case 'stdin':
$soutput .= sprintf("<style type=\"text/css\">%s</style>",$value['data']);
if ($j++)
$soutput .= static::$_spacer;
break;
default:
throw new Kohana_Exception('Unknown style type :type',array(':type'=>$value['type']));
}
}
return $output;
return $foutput.static::$_spacer.$soutput;
}
}
?>