Source for file FileNewDirProxy.php

Documentation is available at FileNewDirProxy.php

  1. <?php
  2. /**
  3. * Class Proxy file when request is a new directory
  4. *
  5. * PHP versions 5
  6. @category  PHP
  7. @package   GeoPrisma
  8. @author    Alexandre Dube
  9. @copyright 2011, Mapgears
  10. @license   http://www.geoprisma.org/license BSD License
  11. @link      http://www.geoprisma.org
  12. */
  13.  
  14. /**
  15. * Class Proxy file when request is a new directory
  16. @category   PHP
  17. @package    GeoPrisma
  18. @subpackage FileProxy
  19. @author     Alexandre Dube
  20. */ 
  21. {
  22.  
  23.     /**
  24.     * Foward the call end return the result
  25.     * 
  26.     * @return void 
  27.     */
  28.     public function process()
  29.     {
  30.         $strPath $this->getLayer();
  31.         $objFileTree new org_geoprisma_proxy_file_FileTree($this->getService()->getSource());
  32.         echo $objFileTree->createDirectory($strPath);
  33.     }
  34.     
  35.     /**
  36.     * Returns the action this proxy does
  37.     *                                   
  38.     * @return string 
  39.     */
  40.     public function getAction()
  41.     {
  42.         return self::CRUD_CREATE;
  43.     }
  44.  
  45.     /**
  46.     * Return Layer
  47.     * 
  48.     * @return string 
  49.     */
  50.     public function getLayer()
  51.     {
  52.         if (isset($_REQUEST['dir']&& $_REQUEST['dir']
  53.         {
  54.             return str_replace(
  55.                 '\\''/'preg_replace('/^root\/?/'''$_REQUEST['dir'])
  56.             );
  57.         }
  58.         return '';        
  59.     }
  60. }
  61.  
  62. ?>

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