Source for file Layer.php

Documentation is available at Layer.php

  1. <?php
  2. /**
  3. * Classe de base des layer, Lier aux fichier de configuration
  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 de base des layer, Lier aux fichier de configuration
  16. *       <layer>
  17. *          <resourcename>ResourceVMap0</resourcename>
  18. *          <servicetype>wms</servicetype>
  19. *          <options>
  20. *            <isbaselayer>true</isbaselayer>
  21. *            <projection>EPSG:4326</projection>
  22. *          </options>
  23. *       </layer>
  24. @category   PHP
  25. @package    GeoPrisma
  26. @subpackage Datastore
  27. @author     Pascal Martin
  28. */ 
  29. {
  30.     private $m_objArrayResourceNames null;
  31.     private $m_strServiceType null;
  32.     private $m_strOptions null;
  33.     
  34.     /**
  35.     * Construit un instance de org_geoprisma_layer_Layer
  36.     * 
  37.     * @param ArrayObject $pobjArrayResourceNames Nom de la ressource du layer
  38.     * @param string      $pstrServiceType        Type de service du layer
  39.     * @param string      $pstrOptions            String XMl avec les options du layer
  40.     * 
  41.     * @return org_geoprisma_layer_Layer 
  42.     */
  43.     public function __construct(
  44.         ArrayObject $pobjArrayResourceNames,
  45.         $pstrServiceType
  46.         $pstrOptions
  47.     {    
  48.         //com_borealis_foundation_util_Assert::assertIsNotEmptyString($pstrServiceType);
  49.         //com_borealis_foundation_util_Assert::assertIsNotEmptyString($pstrOptions); 
  50.         
  51.         $this->m_objArrayResourceNames $pobjArrayResourceNames;
  52.         $this->m_strServiceType $pstrServiceType;
  53.         $this->m_strOptions $pstrOptions
  54.     }
  55.  
  56.     /**
  57.     * Layer ResourceName
  58.     *
  59.     * @return ArrayObject 
  60.     */
  61.     public function getResourceNames()
  62.     {
  63.         return $this->m_objArrayResourceNames;   
  64.     }
  65.     
  66.     /**
  67.     * Layer ServiceType
  68.     *
  69.     * @return string 
  70.     */
  71.     public function getServiceType()
  72.     {
  73.         return $this->m_strServiceType;   
  74.     }
  75.     
  76.     /**
  77.     * Layer Options
  78.     *
  79.     * @return string 
  80.     */
  81.     public function getOptions()
  82.     {
  83.         return $this->m_strOptions;   
  84.     }
  85.  
  86.     /**
  87.     *  Ajout le layer courant (this) dans le xml
  88.     * 
  89.     * @param DOMElement  &$pobjDomElementLayers Noeud xml ou le layer 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 &$pobjDomElementLayersDOMDocument &$pobjDomDocument
  96.     {
  97.         // create single <layer> node and append to <layers>
  98.         $objDomElementLayer $pobjDomDocument->createElement('layer');
  99.         $pobjDomElementLayers->appendChild($objDomElementLayer);
  100.  
  101.         // create <resourcenames>, <servicetype> and <options> nodes
  102.         // with their childs and append to <layer>
  103.         $objDomElementLayer->appendChild(
  104.             $this->getDomElements(
  105.                 'resourcenames'
  106.                 $this->m_objArrayResourceNames
  107.                 $pobjDomDocument
  108.             )
  109.         );
  110.         $objDomElementLayer->appendChild(
  111.             $this->getDomElements(
  112.                 'servicetype'$this->m_strServiceType$pobjDomDocument
  113.             )
  114.         );
  115.         $objDomElementLayer->appendChild(
  116.             $this->getDomElements(
  117.                 'options'$this->m_strOptions$pobjDomDocument
  118.             )
  119.         );
  120.         
  121.     }
  122. }
  123.  
  124. ?>

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