CoreFiles by mySites.guru
QuoteLatex.php50 lines, 1,014 bytes, from Joomla_1.5.21-Stable-Full_Package.zip
Raw History Compare with 1.5.20
md5
0a50adfce26b23309bda9f8cf7c5b791
sha1
f7873795dea182e90f7e079d79435f348df44f80
sha256
40dfcbb5ddc29312d29fbb9482e45a9e402d80c79107359059734fa326aee0e7
<?PHP
/**
 * patTemplate modifier that quotes LaTeX special chars
 *
 * $Id: QuoteLatex.php 10381 2008-06-01 03:35:53Z pasamio $
 *
 * @package		patTemplate
 * @subpackage	Modifiers
 * @author		Stephan Schmidt <[email protected]>
 */

// Check to ensure this file is within the rest of the framework
defined('JPATH_BASE') or die();

/**
 * patTemplate modifier that quotes LaTeX special chars
 *
 * This is useful when creating PDF documents with patTemplate
 *
 * @package		patTemplate
 * @subpackage	Modifiers
 * @author		Stephan Schmidt <[email protected]>
 * @link		http://www.php.net/manual/en/function.strftime.php
 */
class patTemplate_Modifier_QuoteLatex extends patTemplate_Modifier
{
	/**
	 *
	 *
	 */
	var $_chars = array(
						'%' => '\%',
						'&' => '\&',
						'_' => '\_',
						'$' => '\$'
					);

	/**
	* modify the value
	*
	* @access	public
	* @param	string		value
	* @return	string		modified value
	*/
	function modify( $value, $params = array() )
	{
		return strtr($value, $this->_chars);
	}
}
?>

The same content is in 23 releases, Joomla 1.5.4 to 1.5.26. See them all, or every version of this file.