src/classes/CCRouter.php
protected static function prepare( $routes ) 
	{	
		// flatten if needed
		if ( ClanCats::$config->get( 'router.flatten_routes' ) ) 
		{
			$routes = static::flatten( $routes ); 
		}
		
		foreach( $routes as $uri => $route ) 
		{	
			// check for an alias to a private
			if ( is_string( $route ) ) 
			{
				if ( substr( $route, 0, 1 ) == '#' ) 
				{
					$route = static::$privates[$route];
				}
			}
			
			// does this uri contain an alias?
			if ( strpos( $uri, '@' ) !== false )
			{
				// is the entire route an alias
				if ( $uri[0] == '@' )
				{
					static::$aliases[substr( $uri, 1 )] = $route;
				}
				// does it just contain an alias
				else
				{
					list( $uri, $alias ) = explode( '@', $uri );
					static::$aliases[$alias] = $uri;
				}
			}
			
			// check for a private 
			if ( substr( $uri, 0, 1 ) == '#' ) 
			{
				static::$privates[$uri] = $route;
			}
			// just a normal one
			else 
			{
				static::$routes[$uri] = $route;
			}
		}
	}
protected static function prepare( $routes ) 
	{	
		// flatten if needed
		if ( ClanCats::$config->get( 'router.flatten_routes' ) ) 
		{
			$routes = static::flatten( $routes ); 
		}
		
		foreach( $routes as $uri => $route ) 
		{	
			// check for an alias to a private
			if ( is_string( $route ) ) 
			{
				if ( substr( $route, 0, 1 ) == '#' ) 
				{
					$route = static::$privates[$route];
				}
			}
			
			// does this uri contain an alias?
			if ( strpos( $uri, '@' ) !== false )
			{
				// is the entire route an alias
				if ( $uri[0] == '@' )
				{
					static::$aliases[substr( $uri, 1 )] = $route;
				}
				// does it just contain an alias
				else
				{
					list( $uri, $alias ) = explode( '@', $uri );
					static::$aliases[$alias] = $uri;
				}
			}
			
			// check for a private 
			if ( substr( $uri, 0, 1 ) == '#' ) 
			{
				static::$privates[$uri] = $route;
			}
			// just a normal one
			else 
			{
				static::$routes[$uri] = $route;
			}
		}
	}
protected static function prepare ( $ routes ) { // flatten if needed if ( ClanCats :: $ config -> get ( 'router.flatten_routes' ) ) { $ routes = static :: flatten ( $ routes ) ; } foreach ( $ routes as $ uri => $ route ) { // check for an alias to a private if ( is_string ( $ route ) ) { if ( substr ( $ route , 0 , 1 ) == '#' ) { $ route = static :: $ privates [ $ route ] ; } } // does this uri contain an alias? if ( strpos ( $ uri , '@' ) !== false ) { // is the entire route an alias if ( $ uri [ 0 ] == '@' ) { static :: $ aliases [ substr ( $ uri , 1 ) ] = $ route ; } // does it just contain an alias else { list ( $ uri , $ alias ) = explode ( '@' , $ uri ) ; static :: $ aliases [ $ alias ] = $ uri ; } } // check for a private  if ( substr ( $ uri , 0 , 1 ) == '#' ) { static :: $ privates [ $ uri ] = $ route ; } // just a normal one else { static :: $ routes [ $ uri ] = $ route ; } } }
Prepare the routes assing them to their containers

@param array		$routes
@return void
Prepare the routes assing them to their containers