00001 <?php
00002
00008 class STransTK extends STrans {
00013 public function doc() {
00014 return "STransTK takes a toolkit object, renders it and its children "
00015 . "and outputs the result as HTML.";
00016 }
00017
00022 public function getInFormat() {
00023 return 'tk';
00024 }
00025
00030 public function getOutFormat() {
00031 return 'html';
00032 }
00033
00039 public function translate($si) {
00040 if(parent::translate($si) === false)
00041 return false;
00042
00043 $root = $si->getSource();
00044 if(!($root instanceof TKComponent)) {
00045 $si->setPrettyError('translate', "Source must be a toolkit component");
00046 print printBacktrace($place);
00047 return false;
00048 }
00049
00050 $this->sendToTarget($si, $root->render());
00051
00052 return true;
00053 }
00054 }
00055
00056 ?>