Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • ApplicationController
  • GroupController
  • ProxyController
  • TranslationController
  • WelcomeController
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: 
 3: namespace Mapbender\CoreBundle\Controller;
 4: 
 5: use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 6: use Symfony\Component\DependencyInjection\ContainerInterface;
 7: use Symfony\Component\Security\Core\SecurityContext;
 8: use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 9: use Symfony\Component\HttpKernel\Exception\HttpException;
10: use Symfony\Component\HttpFoundation\Response;
11: use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
12: 
13: /**
14:  * Proxy controller.
15:  *
16:  * @author Christian Wygoda
17:  */
18: class ProxyController extends Controller {
19:     /**
20:      * Open Proxy. Only checks if a valid session has been started earlier.
21:      * @Route("/proxy")
22:      */
23:     public function proxyAction() {
24:         $session = $this->get("session");
25:         if($session->get("proxyAllowed",false) !== true) {
26:             throw new AccessDeniedHttpException('You are not allowd to use this'
27:                . ' proxy without a session.');
28:         }
29:         session_write_close();
30: 
31:         return $this->get('mapbender.proxy')->proxy($this->getRequest());
32:     }
33: }
34: 
35: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0