function bar_route_handler($hook, $type, $value, $params) { $value['handler'] = 'foo'; return $value; }