CoreFiles by mySites.guru
HighlightPhp.php51 lines, 1,042 bytes, from Joomla_1.5.3-Stable-Full_Package.zip
Raw History Compare with 1.5.2
md5
771b66083f18efb77529778822f6f7f0
sha1
3e7953407898c96aaf482cb6624127a16568d759
sha256
8aa5b7f5d66751325dbeb3cd5ca341118d20e2bc842f5ea55a26e0e100bedce2
<?PHP
/**
 * patTemplate HighlightPHP filter
 *
 * $Id: HighlightPhp.php 8287 2007-08-01 08:38:59Z eddieajau $
 *
 * Highlights PHP code in the output.
 *
 * @package		patTemplate
 * @subpackage	Filters
 * @author		Stephan Schmidt <[email protected]>
 */

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

/**
 * patTemplate HighlightPHP filter
 *
 * $Id: HighlightPhp.php 8287 2007-08-01 08:38:59Z eddieajau $
 *
 * Highlights PHP code in the output.
 *
 * @package		patTemplate
 * @subpackage	Filters
 * @author		Stephan Schmidt <[email protected]>
 */
class patTemplate_OutputFilter_HighlightPhp extends patTemplate_OutputFilter
{
	/**
	* filter name
	*
	* @access	protected
	* @abstract
	* @var	string
	*/
	var	$_name	=	'HighlightPhp';

	/**
	* remove all whitespace from the output
	*
	* @access	public
	* @param	string		data
	* @return	string		data without whitespace
	*/
	function apply( $data )
	{
		return highlight_string($data, true);
	}
}
?>

The same content is in 4 releases, Joomla 1.5.0 to 1.5.3. See them all, or every version of this file.