@ -56,10 +56,6 @@ final class Router
*/
*/
function proccess ( $path )
function proccess ( $path )
{
{
if ( self :: getRewriteBase ()){
$path = trim ( ltrim ( $path , self :: getRewriteBase ()), '/' );
}
$path = explode ( '/' , $path );
$path = explode ( '/' , $path );
foreach ( $this -> routes as $name => $route ) {
foreach ( $this -> routes as $name => $route ) {
@ -73,21 +69,11 @@ final class Router
throw new StaticPageException ( E_404 );
throw new StaticPageException ( E_404 );
}
}
static public function setRewriteBase ( $value = '' )
{
self :: $rewrite_base = $value ;
}
static public function getRewriteBase ()
{
return self :: $rewrite_base ;
}
static public function setDefaultDecorator ( $decorator )
static public function setDefaultDecorator ( $decorator )
{
{
self :: $decorator = $decorator . DECORATOR_POSTFIX ;
self :: $decorator = $decorator . DECORATOR_POSTFIX ;
}
}
static public function getRouteName ()
static public function getRouteName ()
{
{
return self :: $route_name ;
return self :: $route_name ;