title: codeigniter get all declared routes
body: <p>How to get all declared routes in codeigniter? like ex. print_r($route)</p>
  
  <p>Because this is the problem, if the customer registered his username as 'facebook' he will be routed to account/facebook_login and not to his profile, if i changed the order of routes, all links will be routed to customer/profile and this is a no no!</p>
  
  <p>So basically, instead of listing all the routes that i declare and put it into an another array or db table, i want to loop into route array and check if there is a word that has been declared already so that i can stop them to register that word as their username.</p>
  
  <p>this is my sample routes:</p>
  
  <pre><code>// Account routes
  $route['login'] = 'account/login';
  $route['logout'] = 'account/logout';
  $route['register'] = 'account/register';
  $route['facebook'] = 'account/facebook_login';
  $route['twitter'] = 'account/twitter_login';
  $route['settings'] = 'account/settings';
  
  $route['validate/(:any)'] = 'validate/$1';
  
  // Dynamic routes
  $route['(:any)'] = 'customer/profile/$1';
  </code></pre>