Skip to content

Commit

Permalink
Even further simplification of the URI class.
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Sep 30, 2014
1 parent f5f9782 commit e4e8fde
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions src/Extension/URI.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public function register(Engine $engine)
public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null)
{
if (is_null($var1)) {
return $this->getUri();
return $this->uri;
}

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

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

/**
* Get the URI.
* @return string
*/
protected function getUri()
{
return $this->uri;
}

/**
* Get a URI segment.
* @param integer $key
* @return string
*/
protected function getUriSegment($key)
{
return $this->parts[$key];
}

/**
* Perform a URI segment match.
* @param integer $key
Expand Down

0 comments on commit e4e8fde

Please sign in to comment.