prepareRequestUri() protected method

Code subject to the new BSD license (http://framework.zend.com/license/new-bsd). Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
protected prepareRequestUri ( )
Example #1
0
 /**
  * {@inheritDoc}
  */
 protected function prepareRequestUri()
 {
     if (isset($_GET['q'])) {
         // Allow the router to correctly match paths
         $requestUri = '/' . $_GET['q'];
         $this->server->set('REQUEST_URI', $requestUri);
         // Query string is used by some request listeners for the
         // framework process process, with q= they will fail
         $queryString = $this->server->get('QUERY_STRING');
         $queryString = preg_replace('/q=[^&]*/', '', $queryString);
         if ($queryString && '&' === $queryString[0]) {
             if ('&' === $queryString) {
                 $queryString = '';
             } else {
                 $queryString = substr($queryString, 1);
             }
         }
         $this->server->set('QUERY_STRING', $queryString);
     } else {
         $requestUri = parent::prepareRequestUri();
     }
     return $requestUri;
 }