Welcome Guest, Not a member yet? Register   Sign In
Routing vs Wrapper functions
#1

[eluser]meigwilym[/eluser]
Hi,

I'm building a site for my Rugby Club.

The site is in two parts: info about the club (history etc), and info about the teams (scores, fixtures, match reports etc).

So I have two controllers with functions like this:
Code:
Club
  /index
  /more/id

Team
  /info/teamid  # team homepage
  /fixtures/teamid
  /match-reports/reportid
In my search for prettier URLs (e.g. team/first/fixtures), I think I have two choices: Routing or wrapper functions in the classes.

Code:
$route['team/first'] = 'team/info/1';

# or...

function first(){
  return $this->info(1);
}

So my question is, which is the better way? Is there a difference?

Many thanks,

Mei


Messages In This Thread
Routing vs Wrapper functions - by El Forum - 02-19-2009, 02:46 PM
Routing vs Wrapper functions - by El Forum - 02-19-2009, 03:11 PM
Routing vs Wrapper functions - by El Forum - 02-19-2009, 04:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB