Location: PHPKode > projects > The pimox Engine > tpedev/pimox/CSS2/pimoxStyleCSS2.php
<?php
// $Id: pimoxStyleCSS2.php,v 1.1 2001/11/09 22:18:59 www Exp $
// Project : The pimox Engine Project
// Module  : Style Class - HTML 4 with CSS 2
// This program is licensed as explained in the LICENCE-file of the distribution

global $pimox_include_path;
require_once ( $pimox_include_path . "pimoxStyle.php" );

/**
 ** Realization of the generic issues for The pimox Style Engine's CSS2 version
 ** @author hide@address.com
 ** @version $Revision: 1.1 $
 **/
class pimoxStyleCSS2 extends pimoxStyle {
  // ----------------------------- Public fields ----------------------------------
  /**
   ** The active pimox style number
   ** @public
   ** @type int
   **/
  var $currentStyle;
  // ---------------------------- Private fields ----------------------------------

  // ----------------------------- Public methods ---------------------------------
  /**
   ** Create a CSS2 style object with a given pimox style number. Example:
   ** <pre>
   ** include_once ( $pimox->opeClass( "pimoxStyle" ) );
   ** eval ("\$this->pimoxStyle = new pimoxStyle$pimox->outEngine ( 
   **      \$this->pimox, \$styleNumber );");
   ** </pre>
   ** @param pimox An instance of The pimox Engine on which this object will belong to
   ** @param styleNumber Use this pimox Style number, or use the default value if omitted
   ** @return void
   ** @returns void
   **/
  function pimoxStyleCSS2 ( &$pimox, $styleNumber = 0 ) {
    parent::pimoxStyle( $pimox );

    // Configuration and Language
    include ( $pimox->confThis( $this ) );
    include ( $pimox->langThis( $this ) );

    // Select style
    if ( $styleNumber == 0 )
      $this->currentStyle = $this->defaultStyle;
    else
      $this->currentStyle = $styleNumber;

  } // constructor

  //  ================   Base Class' Abstract Method Implementations   =======

  // -------------------------------------------------------------------------
  function eClass ( $styleName ) {
    return ' class="pimoxS' . $this->currentStyle . ($styleName == "" ? '' : ' ' . $styleName) . '"';
  } // eClass

  // ---------------------------- Private methods ---------------------------------

} // pimoxStyleCSS2

?>
Return current item: The pimox Engine