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/Function/Phphighlight.php

Documentation is available at Phphighlight.php

  1. <?PHP
  2. /**
  3.  * patTemplate function that highlights PHP code in your templates
  4.  *
  5.  * $Id: Phphighlight.php 214 2004-05-18 20:10:45Z schst $
  6.  *
  7.  * @package        patTemplate
  8.  * @subpackage    Functions
  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 function that highlights PHP code in your templates
  17.  *
  18.  * $Id: Phphighlight.php 214 2004-05-18 20:10:45Z schst $
  19.  *
  20.  * @package        patTemplate
  21.  * @subpackage    Functions
  22.  * @author        Stephan Schmidt <[email protected]>
  23.  */
  24. {
  25.    /**
  26.     * name of the function
  27.     * @access    private
  28.     * @var        string 
  29.     */
  30.     var $_name    =    'Phphighlight';
  31.  
  32.    /**
  33.     * call the function
  34.     *
  35.     * @access    public
  36.     * @param    array    parameters of the function (= attributes of the tag)
  37.     * @param    string    content of the tag
  38.     * @return    string    content to insert into the template
  39.     */
  40.     function call$params$content )
  41.     {
  42.         ob_start();
  43.         highlight_string$content );
  44.         $content ob_get_contents();
  45.         ob_end_clean();
  46.         return $content;
  47.     }
  48. }
  49. ?>

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