Skip to content

Commit e4e8fde

Browse files
committed
Even further simplification of the URI class.
1 parent f5f9782 commit e4e8fde

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

src/Extension/URI.php

+2-21
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public function register(Engine $engine)
5858
public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null)
5959
{
6060
if (is_null($var1)) {
61-
return $this->getUri();
61+
return $this->uri;
6262
}
6363

6464
if (is_numeric($var1) and is_null($var2)) {
65-
return $this->getUriSegment($var1);
65+
return $this->parts[$var1];
6666
}
6767

6868
if (is_numeric($var1) and is_string($var2)) {
@@ -76,25 +76,6 @@ public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null)
7676
throw new LogicException('Invalid use of the uri function.');
7777
}
7878

79-
/**
80-
* Get the URI.
81-
* @return string
82-
*/
83-
protected function getUri()
84-
{
85-
return $this->uri;
86-
}
87-
88-
/**
89-
* Get a URI segment.
90-
* @param integer $key
91-
* @return string
92-
*/
93-
protected function getUriSegment($key)
94-
{
95-
return $this->parts[$key];
96-
}
97-
9879
/**
9980
* Perform a URI segment match.
10081
* @param integer $key

0 commit comments

Comments
 (0)