map = $map; $this->methodData =& $GLOBALS[ '_' . strtoupper( $method ) ]; } /** * put your comment there... * * @param mixed $route * @return CJTServicesRequestRouter */ public function getRoute(& $route) { # Initialize $newRoute = array(); # Overwrite defauls values if submitted foreach ( $this->map as $name => $paramName ) { $newRoute[ $name ] = isset( $this->methodData[ $paramName ] ) ? $this->methodData[ $paramName ] : ( isset( $route[ $name ] ) ? $route[ $name ] : null ); } # Set new route $route = array_merge( $route, $newRoute ); # Chain return $this; } }