diff options
author | msquare <msquare@notrademark.de> | 2018-08-06 12:57:48 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-08-06 12:57:48 +0200 |
commit | 9496e3571168feff780f6efb17ddc00c670e2dee (patch) | |
tree | 7313a4fecc2da111a199e727b12e88346d5db230 /src/Routing | |
parent | 86b29370786de35cc40e3424e09c3cf48551ee28 (diff) |
added comments and renamed short method to url generators
Diffstat (limited to 'src/Routing')
-rw-r--r-- | src/Routing/LegacyUrlGenerator.php | 4 | ||||
-rw-r--r-- | src/Routing/UrlGenerator.php | 2 | ||||
-rw-r--r-- | src/Routing/UrlGeneratorInterface.php | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Routing/LegacyUrlGenerator.php b/src/Routing/LegacyUrlGenerator.php index e2434e1f..4c1e736b 100644 --- a/src/Routing/LegacyUrlGenerator.php +++ b/src/Routing/LegacyUrlGenerator.php @@ -14,7 +14,7 @@ class LegacyUrlGenerator extends UrlGenerator * @param array $parameters * @return string urls in the form <app url>/index.php?p=<path>&<parameters> */ - public function link_to($path, $parameters = []) + public function linkTo($path, $parameters = []) { $page = ltrim($path, '/'); if (!empty($page)) { @@ -22,7 +22,7 @@ class LegacyUrlGenerator extends UrlGenerator $parameters = array_merge(['p' => $page], $parameters); } - $uri = parent::link_to('index.php', $parameters); + $uri = parent::linkTo('index.php', $parameters); $uri = preg_replace('~(/index\.php)+~', '/index.php', $uri); return $uri; diff --git a/src/Routing/UrlGenerator.php b/src/Routing/UrlGenerator.php index a8fc88c1..188bac3b 100644 --- a/src/Routing/UrlGenerator.php +++ b/src/Routing/UrlGenerator.php @@ -14,7 +14,7 @@ class UrlGenerator implements UrlGeneratorInterface * @param array $parameters * @return string url in the form [app url]/[path]?[parameters] */ - public function link_to($path, $parameters = []) + public function linkTo($path, $parameters = []) { $path = '/' . ltrim($path, '/'); $request = app('request'); diff --git a/src/Routing/UrlGeneratorInterface.php b/src/Routing/UrlGeneratorInterface.php index 17385bc2..f1a8ffed 100644 --- a/src/Routing/UrlGeneratorInterface.php +++ b/src/Routing/UrlGeneratorInterface.php @@ -12,5 +12,5 @@ interface UrlGeneratorInterface * @param array $parameters * @return string */ - public function link_to($path, $parameters = []); + public function linkTo($path, $parameters = []); } |