summaryrefslogtreecommitdiff
path: root/src/Routing/LegacyUrlGenerator.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2018-08-06 12:50:34 +0200
committermsquare <msquare@notrademark.de>2018-08-06 12:50:34 +0200
commit86b29370786de35cc40e3424e09c3cf48551ee28 (patch)
tree7d605f5b24c864d91c50bfe9df333f95d272f7b5 /src/Routing/LegacyUrlGenerator.php
parent5a83d4fb8b7d2fc561a2b841ab6981df02837b2d (diff)
added comments and renamed short method to url generators
Diffstat (limited to 'src/Routing/LegacyUrlGenerator.php')
-rw-r--r--src/Routing/LegacyUrlGenerator.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Routing/LegacyUrlGenerator.php b/src/Routing/LegacyUrlGenerator.php
index f17bdf88..e2434e1f 100644
--- a/src/Routing/LegacyUrlGenerator.php
+++ b/src/Routing/LegacyUrlGenerator.php
@@ -2,14 +2,19 @@
namespace Engelsystem\Routing;
+/**
+ * Provides urls when webserver rewriting is disabled.
+ *
+ * The urls have the form <app url>/index.php?p=<path>&<parameters>
+ */
class LegacyUrlGenerator extends UrlGenerator
{
/**
* @param string $path
* @param array $parameters
- * @return string
+ * @return string urls in the form <app url>/index.php?p=<path>&<parameters>
*/
- public function to($path, $parameters = [])
+ public function link_to($path, $parameters = [])
{
$page = ltrim($path, '/');
if (!empty($page)) {
@@ -17,7 +22,7 @@ class LegacyUrlGenerator extends UrlGenerator
$parameters = array_merge(['p' => $page], $parameters);
}
- $uri = parent::to('index.php', $parameters);
+ $uri = parent::link_to('index.php', $parameters);
$uri = preg_replace('~(/index\.php)+~', '/index.php', $uri);
return $uri;