Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: patTemplate

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /pattemplate/patTemplate/Modifier/QuoteLatex.php

Documentation is available at QuoteLatex.php

  1. <?PHP
  2. /**
  3.  * patTemplate modifier that quotes LaTeX special chars
  4.  *
  5.  * $Id: QuoteLatex.php 355 2005-01-03 15:56:52Z schst $
  6.  *
  7.  * @package        patTemplate
  8.  * @subpackage    Modifiers
  9.  * @author        Stephan Schmidt <[email protected]>
  10.  */
  11.  
  12. // Check to ensure this file is within the rest of the framework
  13. defined('JPATH_BASE'or die();
  14.  
  15. /**
  16.  * patTemplate modifier that quotes LaTeX special chars
  17.  *
  18.  * This is useful when creating PDF documents with patTemplate
  19.  *
  20.  * @package        patTemplate
  21.  * @subpackage    Modifiers
  22.  * @author        Stephan Schmidt <[email protected]>
  23.  * @link        http://www.php.net/manual/en/function.strftime.php
  24.  */
  25. {
  26.     /**
  27.      *
  28.      *
  29.      */
  30.     var $_chars = array(
  31.                         '%' => '\%',
  32.                         '&' => '\&',
  33.                         '_' => '\_',
  34.                         '$' => '\$'
  35.                     );
  36.  
  37.    /**
  38.     * modify the value
  39.     *
  40.     * @access    public
  41.     * @param    string        value
  42.     * @return    string        modified value
  43.     */
  44.     function modify$value$params array() )
  45.     {
  46.         return strtr($value$this->_chars);
  47.     }
  48. }
  49. ?>

Documentation generated on Mon, 05 Mar 2007 21:19:14 +0000 by phpDocumentor 1.3.1