[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/pattemplate/patTemplate/Function/ -> Alias.php (source)

   1  <?PHP
   2  /**
   3   * creates a new function alias
   4   *
   5   * $Id: Alias.php 10381 2008-06-01 03:35:53Z pasamio $
   6   *
   7   * @package        patTemplate
   8   * @subpackage    Functions
   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   * creates a new function alias
  17   *
  18   * Possible attributes:
  19   * - alias => new alias
  20   * - function => function to call
  21   *
  22   * $Id: Alias.php 10381 2008-06-01 03:35:53Z pasamio $
  23   *
  24   * @package        patTemplate
  25   * @subpackage    Functions
  26   * @author        Stephan Schmidt <schst@php.net>
  27   */
  28  class patTemplate_Function_Alias extends patTemplate_Function
  29  {
  30      /**
  31      * name of the function
  32      * @access    private
  33      * @var        string
  34      */
  35      var $_name    =    'Alias';
  36  
  37      /**
  38      * call the function
  39      *
  40      * @access    public
  41      * @param    array    parameters of the function (= attributes of the tag)
  42      * @param    string    content of the tag
  43      * @return    string    content to insert into the template
  44      */
  45  	function call( $params, $content )
  46      {
  47          if( !isset( $params['alias'] ) )
  48              return false;
  49  
  50          if( !isset( $params['function'] ) )
  51              return false;
  52  
  53          $this->_reader->addFunctionAlias($params['alias'], $params['function']);
  54          return '';
  55      }
  56  }
  57  ?>


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1