• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Smarty/libs/plugins/function.eval.php

00001 <?php
00020 function smarty_function_eval($params, &$smarty)
00021 {
00022 
00023     if (!isset($params['var'])) {
00024         $smarty->trigger_error("eval: missing 'var' parameter");
00025         return;
00026     }
00027 
00028     if($params['var'] == '') {
00029         return;
00030     }
00031 
00032     $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled);
00033 
00034     ob_start();
00035     $smarty->_eval('?>' . $_var_compiled);
00036     $_contents = ob_get_contents();
00037     ob_end_clean();
00038 
00039     if (!empty($params['assign'])) {
00040         $smarty->assign($params['assign'], $_contents);
00041     } else {
00042         return $_contents;
00043     }
00044 }
00045 
00046 /* vim: set expandtab: */
00047 
00048 ?>

Generated on Thu Apr 19 2012 17:01:16 for openbiz by  doxygen 1.7.2