Source for file Option.php

Documentation is available at Option.php

  1. <?php
  2. /**
  3. * Classe option de ressource ou de widget
  4. *
  5. * PHP versions 5
  6. @category  PHP
  7. @package   GeoPrisma
  8. @author    Pascal Martin
  9. @copyright 2009, Boreal - Information Strategies
  10. @license   http://www.geoprisma.org/license BSD License
  11. @link      http://www.geoprisma.org
  12. */
  13.  
  14. /**
  15. * Classe option de ressource ou de widget
  16. @category   PHP
  17. @package    GeoPrisma
  18. @subpackage Option
  19. @author     Pascal Martin
  20. */ 
  21. {
  22.     private $m_strName null;
  23.     private $m_strValue null;
  24.     
  25.     /**
  26.     * Construit un instance de org_geoprisma_option_Option
  27.     * 
  28.     * @param string $pstrName  Option name
  29.     * @param string $pstrValue Option value
  30.     * 
  31.     * @return org_geoprisma_option_Option 
  32.     */
  33.     public function __construct($pstrName $pstrValue
  34.     {    
  35.         com_borealis_foundation_util_Assert::assertIsNotEmptyString($pstrName);
  36.         //com_borealis_foundation_util_Assert::assertIsString($pstrValue); 
  37.         
  38.         $this->m_strName $pstrName;
  39.         $this->m_strValue $pstrValue;
  40.     }
  41.  
  42.     /**
  43.     * Option Name
  44.     *
  45.     * @return string 
  46.     */
  47.     public function getName()
  48.     {
  49.         return $this->m_strName;   
  50.     }
  51.     
  52.     /**
  53.     * Option value
  54.     *
  55.     * @return string 
  56.     */
  57.     public function getValue()
  58.     {
  59.         return $this->m_strValue;   
  60.     }
  61.  
  62.     /**
  63.     * Set option value
  64.     *
  65.     * @param string $pstrValue Option value
  66.     *
  67.     * @return string 
  68.     */
  69.     public function setValue($pstrValue
  70.     {
  71.         $this->m_strValue $pstrValue;
  72.     }
  73.  
  74.     /**
  75.     * Set option name
  76.     *
  77.     * @param string $pstrName Option name
  78.     *
  79.     * @return string 
  80.     */
  81.     public function setName($pstrName
  82.     {
  83.         $this->m_strName $pstrName;
  84.     }
  85.     
  86.     /**
  87.     *  Ajout l'option courant (this) dans le xml
  88.     * 
  89.     * @param DOMElement  &$pobjDomElementOptions Noeud xml ou l'option doit ĂȘtre ajouter
  90.     * @param DOMDocument &$pobjDomDocument       Document XMl ou le noeud xml datastore est ajouter, utiliser pour construire les noeuds
  91.     * 
  92.     * @return void 
  93.     */
  94.     public function insertIntoXML(
  95.         DOMElement &$pobjDomElementOptionsDOMDocument &$pobjDomDocument
  96.     {
  97.         $pobjDomElementOptions->appendChild(
  98.             $this->getDomElements(
  99.                 $this->getName()$this->getValue()$pobjDomDocument
  100.             )
  101.         );
  102.     }
  103. }
  104.  
  105. ?>

Documentation generated on Thu, 19 Jan 2012 00:08:42 +0400 by phpDocumentor 1.4.1