Add the route and send the box.
546077
def sendBox(self, box):
        
        if self.remoteRouteName is _unspecified:
            raise RouteNotConnected()
        if self.remoteRouteName is not None:
            box[_ROUTE] = self.remoteRouteName.encode('ascii')
        self.router._sender.sendBox(box)
283617
public function send()
    {
        $settings = Application::getSettings()->mail;
        $mailTransport = new Transport(
            @$settings->smtp->host ? : 'localhost',
            @$settings->smtp->port ? : 25,
            @$settings->smtp->timeout ? : 15
        );

        $mailTransport->setUser(
            @$settings->smtp->user,
            @$settings->smtp->password
        );

        $mailTransport->addMessage($this);

        $mailTransport->send();
    }
411697
function addRoutes(routes) {
        if (isReactChildren(routes)) routes = createRoutesFromReactChildren(routes);

        addRoutesToNamedRoutes(routes, Router.namedRoutes);

        Router.routes.push.apply(Router.routes, routes);
      }
784102
public function setup()
    {
        $this->groupRoutes();

        foreach ($this->routes as $type => $routes) {
            foreach ($routes as $name => $route) {
                $newRoute = new Route($name, $route);
                if (!$newRoute->hasParam('hostname')) {
                    $newRoute->setParam('hostname', $this->resolveDefaultHostName());
                }

                $routeType = $this->resolveRouteType($type);
                $routeType->add($this->getRouter(), $newRoute);
            }
        }
    }
727316
def _on_add_route(self, msg):
        
        if msg.is_dead:
            return

        target_id_s, _, target_name = bytes_partition(msg.data, b(':'))
        target_name = target_name.decode()
        target_id = int(target_id_s)
        self.router.context_by_id(target_id).name = target_name
        stream = self.router.stream_by_id(msg.auth_id)
        current = self.router.stream_by_id(target_id)
        if current and current.remote_id != mitogen.parent_id:
            LOG.error('Cannot add duplicate route to %r via %r, '
                      'already have existing route via %r',
                      target_id, stream, current)
            return

        LOG.debug('Adding route to %d via %r', target_id, stream)
        self._routes_by_stream[stream].add(target_id)
        self.router.add_route(target_id, stream)
        self._propagate_up(mitogen.core.ADD_ROUTE, target_id, target_name)
775564
def box_add(self, name, url, provider=None, force=False):
        '''
        
        '''
        force_opt = '--force' if force else None
        cmd = ['box', 'add', name, url, force_opt]
        if provider is not None:
            cmd += ['--provider', provider]

        self._call_vagrant_command(cmd)
818454
function Router_add(route) {
        var rule;
        if (Array.isArray(route)) {
            route.forEach(Router_add.bind(this));
            return;
        }
        if (route.dynamic) {
            if (Type.isFunction(route.constructor)) {
                rule = new route.constructor();
            } else {
                throw new error.HttpError(500, {route: route}, 'Router.add: dynamic route is not function');
            }
        } else {
            rule = new RouteRule(route);
        }

        if (!(rule instanceof RouteRuleInterface)) {
            throw new error.HttpError(500, {rule: rule, route: route}, 'Router.add: rule must be instance of RouteRuleInterface');
        }

        logger.info('Router.add:', route);

        this.routes.push(rule);
    }
422538
public void addBox(Box box) {
        if (box != null) {
            boxes = new ArrayList<Box>(getBoxes());
            boxes.add(box);
        }
    }
1350141
public function route()
	{
		$content = $this->_controller->{$this->_actionMethod}();

		if ($this->_controller->isJson()) {
			Request::setHeader(Request::HEADER_JSON);
			echo json_encode($content);
		} else {
			echo $content;
		}
	}
1145424
def create_route(self, item, routes):
        """"""
        for route in routes:
            self._routes.setdefault(route, set()).add(item)
        return item
1131491
private function addCustomRoutes()
    {
        foreach (Route::getRoutes() as $route) {
            $this->_router->respond($route['method'], $route['path'], $route['callback']);
        }
    }
151244
private function addRoutes()
    {
        if (class_exists($Router = 'Josantonius\Router\Router')) {
            if (isset($this->complement['routes'])) {
                $Router::add($this->complement['routes']);
            }
        }
    }
1006706
def _put(self, url, data={}):
        """"""
        r = requests.put(self._api_prefix + url,
            data=json.dumps(data),
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
1208225
function addAvailableRoutes(router) {
  return (req, res, next) => {
    const routes = router.stack
      .filter((r) => r.route && r.route.path) // grab only the defined routes (not api stuff)
      .map((r) => r.route.path); // pull out their paths

    res.locals.routes = routes; // and add them to the locals
    next();
  };
}
607767
def add_router_to_l3_agent(self, l3_agent, body):
        """"""
        return self.post((self.agent_path + self.L3_ROUTERS) % l3_agent,
                         body=body)
46851
def send(self, msg):
        
        msg.dst_id = self.context_id
        self.router.route(msg)
946916
def add_get(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_GET, *args, **kwargs)