Skip to content

Commit

Permalink
Reorder some code.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Nov 23, 2013
1 parent a81b472 commit 7db4b88
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/Orchestra/Foundation/Abstractable/RouteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,36 +77,36 @@ public function locate($name)
}

/**
* Return handles URL for a package/app.
* Return route group dispatch for a package/app.
*
* @param string $name Package name
* @return string
*/
public function handles($path)
public function group($name, $default, $group = array())
{
$locate = $this->locate($path);

if (starts_with($locate, 'http')) {
return $locate;
}
$route = $this->route($name, $default);

return $this->app['url']->to($locate);
return array_merge($group, array(
'prefix' => $route->prefix(),
'domain' => $route->domain(),
));
}

/**
* Return route group dispatch for a package/app.
* Return handles URL for a package/app.
*
* @param string $name Package name
* @return string
*/
public function group($name, $default, $group = array())
public function handles($path)
{
$route = $this->route($name, $default);
$locate = $this->locate($path);

return array_merge($group, array(
'prefix' => $route->prefix(),
'domain' => $route->domain(),
));
if (starts_with($locate, 'http')) {
return $locate;
}

return $this->app['url']->to($locate);
}

/**
Expand Down

0 comments on commit 7db4b88

Please sign in to comment.