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

Source for file modifier.errortype.php

Documentation is available at modifier.errortype.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2002, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: modifier.errortype.php 18167 2006-03-16 01:49:56Z drak $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @package      Zikula_System_Modules
  10.  * @subpackage   Errors
  11.  */
  12.  
  13. /**
  14.  * Smarty modifier to convert lanugage define into textual string
  15.  *
  16.  * This modifier converts a lanugage define (currently a defined contant e.g.
  17.  * _MYCONST) into the language string represented by that define
  18.  *
  19.  *
  20.  * Example
  21.  *
  22.  *   <!--[$var|errortype]-->
  23.  *
  24.  * @author       Mark West
  25.  * @since        16. Sept. 2003
  26.  * @see          modifier.errortype.php::smarty_modifier_errortype()
  27.  * @param        array    $string     the contents to transform
  28.  * @return       string   the modified output
  29.  */
  30. function smarty_modifier_errortype($string)
  31. {
  32.     switch ($string{
  33.         case E_ERROR:
  34.         case E_USER_ERROR:
  35.             $msg _ERRORS_USER_ERROR;
  36.             break;
  37.         case E_WARNING:
  38.         case E_USER_WARNING:
  39.             $msg _ERRORS_USER_WARNING;
  40.             break;
  41.         case E_NOTICE:
  42.         case E_USER_NOTICE:
  43.             $msg _ERRORS_USER_NOTICE;
  44.             break;
  45.         default:
  46.             $msg _ERRORS_USER_UNKNOWN;
  47.             break;
  48.     }
  49.  
  50.     return $msg;
  51. }

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