Source for file ConfigProxy.php

Documentation is available at ConfigProxy.php

  1. <?php
  2. /**
  3. * Class Proxy de type 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. * Class Proxy de type widget
  16. @category   PHP
  17. @package    GeoPrisma
  18. @subpackage Proxy
  19. @author     Pascal Martin
  20. */     
  21. {
  22.     /**
  23.     * @var org_geoprisma_config_Config 
  24.     */
  25.     private $m_objConfig null;
  26.  
  27.     private $m_strMethod null;
  28.     
  29.     /**
  30.     * Creates an instance of org_geoprisma_proxy_config_ConfigProxy
  31.     * 
  32.     * @param org_geoprisma_config_Config $pobjConfig  Config
  33.     * @param string                      $pstrProcess Process
  34.     * 
  35.     * @return org_geoprisma_proxy_config_ConfigProxy 
  36.     */
  37.     public function __construct(
  38.         org_geoprisma_config_Config $pobjConfig,
  39.         $pstrProcess
  40.     {
  41.         $this->m_objConfig $pobjConfig;
  42.         $this->m_strMethod $pstrProcess;
  43.  
  44.         try
  45.         {
  46.             if (count($pobjConfig->getProcessList()) == 0
  47.             {
  48.                 throw new Exception("The \"".get_class($objConfig)."\" config driver doesn't support any osmprocess value.");
  49.  
  50.             }
  51.             else if (!in_array($pstrProcess$pobjConfig->getProcessList())) 
  52.             {
  53.                 throw new Exception("osmprocess param has an invalid value.  Possible values are : ".implode(", "$pobjConfig->getProcessList()));
  54.  
  55.             }
  56.         }
  57.         catch (Exception $objException)
  58.         {
  59.             $this->echoJsonError($objException->getMessage());
  60.             exit();
  61.         }
  62.     }
  63.     
  64.     /**
  65.     * Retourne le nom de l'action réaliser par le proxy (Create - Read - Update - Delete)
  66.     *                                   
  67.     * @return string 
  68.     */
  69.     public function getAction(
  70.     {
  71.         return null;
  72.     }
  73.  
  74.     /**
  75.     * Call the widget method
  76.     * 
  77.     * @return void 
  78.     */
  79.     public function process()
  80.     {
  81.         try
  82.         {
  83.             $this->echoJsonResult(
  84.                 call_user_func(array($this->m_objConfig$this->m_strMethod))
  85.             );
  86.         }
  87.         catch (Exception $objException)
  88.         {
  89.             $this->echoJsonError($objException->getMessage());
  90.         }
  91.     }
  92.     
  93.     /**
  94.     * Retourne la liste de layer accèder par la query
  95.     * 
  96.     * @return ArrayObject 
  97.     */
  98.     public function getLayers()
  99.     {
  100.         return null;
  101.     }
  102. }
  103.   
  104. ?>

Documentation generated on Mon, 20 Feb 2012 13:46:10 -0500 by phpDocumentor 1.4.1