refactoring. added redis drivers.

This commit is contained in:
Taylor Otwell
2011-10-26 21:21:31 -05:00
parent 8595253afe
commit 7bf84066bf
19 changed files with 429 additions and 135 deletions

View File

@@ -41,9 +41,7 @@ class URI {
{
if ( ! is_null($this->uri)) return $this->uri;
$uri = parse_url($this->server['REQUEST_URI'], PHP_URL_PATH);
return $this->uri = $this->format($this->clean($uri));
return $this->uri = $this->format($this->clean($this->parse($this->server['REQUEST_URI'])));
}
/**
@@ -54,14 +52,24 @@ class URI {
*/
protected function clean($uri)
{
$uri = $this->remove($uri, parse_url(Config::$items['application']['url'], PHP_URL_PATH));
$uri = $this->remove($uri, $this->parse(Config::$items['application']['url']));
if (($index = '/'.Config::$items['application']['index']) !== '/')
{
$uri = $this->remove($uri, $index);
}
return rtrim($uri, '.'.Request::format($uri));
return $uri;
}
/**
* Parse a given string URI using PHP_URL_PATH to remove the domain.
*
* @return string
*/
protected function parse($uri)
{
return parse_url($uri, PHP_URL_PATH);
}
/**