Support Joomla!

Packages

Package: patTemplate

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.
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 10381 2008-06-01 03:35:53Z pasamio $
  6.  *
  7.  * @package        patTemplate
  8.  * @subpackage    Modifiers
  9.  * @author        Stephan Schmidt <schst@php.net>
  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 <schst@php.net>
  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 Sun, 21 Dec 2008 20:48:44 +0000 by phpDocumentor 1.3.1