[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Text/reST/ -> Formatter.php (source)

   1  <?php
   2  /**
   3   * The Text_reST_Formatter:: class is the framework for rendering
   4   * reStructuredText documents to different media (e.g. HTML).
   5   *
   6   * $Horde: framework/Text_reST/reST/Formatter.php,v 1.5.10.9 2006/01/01 21:28:39 jan Exp $
   7   *
   8   * Copyright 2003-2006 Jason M. Felice <jfelice@cronosys.com>
   9   *
  10   * See the enclosed file COPYING for license information (LGPL). If you did not
  11   * receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  12   *
  13   * @author  Jason M. Felice <jfelice@cronosys.com>
  14   * @package Text_reST
  15   */
  16  class Text_reST_Formatter {
  17  
  18      /**
  19       * Array of driver-specific parameters for formatting.
  20       *
  21       * @var array
  22       */
  23      var $_args;
  24  
  25      /**
  26       * Construct a new formatter.
  27       *
  28       * @access protected
  29       *
  30       * @param array $args  Arguments specific to this formatter.
  31       */
  32      function Text_reST_Formatter($args = array())
  33      {
  34          $this->_args = $args;
  35      }
  36  
  37      /**
  38       * Construct a new formatter.
  39       *
  40       * @param string $driver  Name of the formatting driver to construct.
  41       * @param array $args     An array of driver-specific parameters.
  42       *
  43       * @return Text_reST_Formatter  The formatter
  44       */
  45      function &factory($driver, $args = array())
  46      {
  47          if (is_array($driver)) {
  48              list($path, $driver) = $driver;
  49          } else {
  50              $path = dirname(__FILE__) . '/Formatter/';
  51          }
  52          $class = 'Text_reST_Formatter_' . $driver;
  53          require_once $path . $driver . '.php';
  54          $formatter = &new $class($args);
  55          return $formatter;
  56      }
  57  
  58      /**
  59       * Render the document.
  60       *
  61       * @abstract
  62       *
  63       * @param Text_reST $document  The document we will render.
  64       * @param string $charset      The output charset.
  65       */
  66      function format(&$document, $charset = null)
  67      {
  68      }
  69  
  70  }


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7