public function addRoutes($routes, $context = null) { foreach ($routes as $routeKey => $info) { $data = $this->routeData($routeKey, $info, $context); $route = $this->auraRouter->add($data['name'], $data['path']); if (!empty($data['method']) && in_array($data['method'], array('GET', 'POST'))) { $route->addServer(array('REQUEST_METHOD' => $data['method'])); } // unset($data['name']); unset($data['path']); if (!empty($data['where'])) { $route->addTokens($data['where']); unset($data['where']); } $route->addValues($data); } }