Xanthia_Templating_Environment
[ class tree: Xanthia_Templating_Environment ] [ index: Xanthia_Templating_Environment ] [ all elements ]

Source for file function.phpfunctionexists.php

Documentation is available at function.phpfunctionexists.php

  1. <?php
  2. /**
  3.  * pnRender plugin
  4.  *
  5.  * This file is a plugin for pnRender, the Zikula implementation of Smarty
  6.  *
  7.  * @package      Xanthia_Templating_Environment
  8.  * @subpackage   pnRender
  9.  * @version      $Id: function.themelist.php 20025 2006-09-15 07:31:06Z markwest $
  10.  * @author       The Zikula development team
  11.  * @link         http://www.zikula.org  The Zikula Home Page
  12.  * @copyright    Copyright (C) 2002 by the Zikula Development Team
  13.  * @license      http://www.gnu.org/copyleft/gpl.html GNU General Public License
  14.  */
  15.  
  16. function smarty_function_phpfunctionexists($params&$smarty)
  17. {
  18.     if (!isset($params['func'])) {
  19.         return false;
  20.     }
  21.  
  22.     $funcexists false;
  23.     if (function_exists($params['func'])) {
  24.         $funcexists true;
  25.     }
  26.  
  27.     if (isset($params['assign'])) {
  28.         $smarty->assign($params['assign']$funcexists);
  29.     else {
  30.         return $funcexists;
  31.     }
  32. }

Documentation generated on Fri, 18 Jul 2008 21:45:34 +0200 by phpDocumentor 1.4.1