phpDocumentor system
[ class tree: system ] [ index: system ] [ all elements ]

Source for file attribut.class.php

Documentation is available at attribut.class.php

  1. <?php
  2.  
  3.     /**
  4.      * Attribut d'une balise.
  5.      *
  6.      * @package system
  7.      * @author Alain Defrance
  8.      * @example wpmAttribut.inc Comment manipuler un wpmAttribut.
  9.      */
  10.     class wpmAttribut extends wpmObject
  11.     {
  12.         /**
  13.          * nom de l'attribut.
  14.          *
  15.          * @var string 
  16.          * @access private
  17.          */
  18.         private $nom;
  19.         
  20.         /**
  21.          * valeur de l'attribut.
  22.          *
  23.          * @var string 
  24.          * @access private
  25.          */
  26.         private $value;
  27.         
  28.         /**
  29.          * Initialise l'attribut.
  30.          *
  31.          * @param string $pNom 
  32.          * @param string $pValue 
  33.          */
  34.         public function __construct($pNom$pValue)
  35.         {
  36.             parent::__construct();
  37.             $this->setNom($pNom);
  38.             $this->setValue($pValue);
  39.         }
  40.         
  41.         /**
  42.          * Définit le nom de l'attribut.
  43.          *
  44.          * @param string $pNom 
  45.          */
  46.         public function setNom($pNom$this->nom = $pNom}
  47.         /**
  48.          * Définit la valeur de l'attribut.
  49.          *
  50.          * @param string $pValue 
  51.          */
  52.         public function setValue($pValue$this->value = $pValue}
  53.         
  54.         /**
  55.          * Retourne le nom de l'attribut.
  56.          *
  57.          * @return string 
  58.          */
  59.         public function getNom(return $this->nom}
  60.         /**
  61.          * Retourne la valeur de l'attribut.
  62.          *
  63.          * @return string 
  64.          */
  65.         public function getValue(return $this->value}
  66.         
  67.         /**
  68.          * Retourne le code html de l'attribut.
  69.          *
  70.          * @return string 
  71.          */
  72.         public function generer()
  73.         {
  74.             return "$this->nom=\"$this->value\"";
  75.         }
  76.     };
  77. ?>

Documentation generated on Fri, 04 Jul 2008 23:38:34 +0200 by phpDocumentor 1.4.0a2