From fc9401f04a3aca5abb22f87ebc210de8afe11d32 Mon Sep 17 00:00:00 2001 From: marvin-borner@live.com Date: Tue, 10 Apr 2018 21:50:16 +0200 Subject: Initial Commit --- .../symfony/http-foundation/ApacheRequest.php | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 assets/php/vendor/symfony/http-foundation/ApacheRequest.php (limited to 'assets/php/vendor/symfony/http-foundation/ApacheRequest.php') diff --git a/assets/php/vendor/symfony/http-foundation/ApacheRequest.php b/assets/php/vendor/symfony/http-foundation/ApacheRequest.php new file mode 100644 index 0000000..84803eb --- /dev/null +++ b/assets/php/vendor/symfony/http-foundation/ApacheRequest.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +/** + * Request represents an HTTP request from an Apache server. + * + * @author Fabien Potencier + */ +class ApacheRequest extends Request +{ + /** + * {@inheritdoc} + */ + protected function prepareRequestUri() + { + return $this->server->get('REQUEST_URI'); + } + + /** + * {@inheritdoc} + */ + protected function prepareBaseUrl() + { + $baseUrl = $this->server->get('SCRIPT_NAME'); + + if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) { + // assume mod_rewrite + return rtrim(dirname($baseUrl), '/\\'); + } + + return $baseUrl; + } +} -- cgit v1.2.3