Process the route part of the site description element.
162796
function _processRoute(siteDesc, prefix, options) {
    options = options || {};
    //if (siteDesc.roles !== undefined && siteDesc.url !== undefined)
    //console.log('route', siteDesc.url, 'prefix', prefix);

    if (userHelper.hasRole(siteDesc.roles)) {
        let route = {
            roles: siteDesc.roles,
            name: prefix,
            route: siteDesc.url,
            regex: routeToRegExp(siteDesc.url),
            requiredParams: siteDesc.requiredParams
        };
        //Call the Backbone.history.handlers....
        //console.log('*****************');
        //console.log('ROute name: ',route.route);
        //console.log('Route handler name : ',  findRouteName(route.route.substring(1)));
        routes[findRouteName(route.route.substring(1))] = route;
        if (options.isInSiteStructure) {
            siteStructure[prefix] = route;
        }
    }
}
61427
def process_route(pattern, keys, conditions, block = nil, values = [])
      route = @request.path_info
      route = '/' if route.empty? and not settings.empty_path_info?
      return unless match = pattern.match(route)
      values += match.captures.to_a.map { |v| force_encoding URI.decode_www_form_component(v) if v }

      if values.any?
        original, @params = params, params.merge('splat' => [], 'captures' => values)
        keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
      end

      catch(:pass) do
        conditions.each { |c| throw :pass if c.bind(self).call == false }
        block ? block[self, values] : yield(self, values)
      end
    ensure
      @params = original if original
    end
660045
function describe(ctx) {
  try {
    return ctx.operation.spec.method + ' ' +
      ctx.operation.resource.spec.path + ' ';
  } catch (err) {
    return '';
  }
}
252561
def process_rels
      links = ( @headers["Link"] || "" ).split(', ').map do |link|
        href, name = link.match(/<(.*?)>; rel="(\w+)"/).captures

        [name.to_sym, Relation.from_link(@agent, name, :href => href)]
      end

      Hash[*links.flatten]
    end
136783
@PostConstruct
    public void process() {
        Collection<BeanDefinition<?>> filterDefinitions = beanContext.getBeanDefinitions(Qualifiers.byStereotype(Filter.class));
        for (BeanDefinition<?> beanDefinition : filterDefinitions) {
            if (HttpClientFilter.class.isAssignableFrom(beanDefinition.getBeanType())) {
                // ignore http client filters
                continue;
            }
            String[] patterns = beanDefinition.getValue(Filter.class, String[].class).orElse(null);
            if (ArrayUtils.isNotEmpty(patterns)) {
                HttpMethod[] methods = beanDefinition.getValue(Filter.class, "methods", HttpMethod[].class).orElse(null);
                String first = patterns[0];
                FilterRoute filterRoute = addFilter(first, () -> beanContext.getBean((Class<HttpFilter>) beanDefinition.getBeanType()));
                if (patterns.length > 1) {
                    for (int i = 1; i < patterns.length; i++) {
                        String pattern = patterns[i];
                        filterRoute.pattern(pattern);
                    }
                }
                if (ArrayUtils.isNotEmpty(methods)) {
                    filterRoute.methods(methods);
                }
            }
        }
    }
1127820
def process(cls, post, render=True):
        
        post["slug"] = cls.create_slug(post["title"])
        post["editable"] = cls.is_author(post, current_user)
        post["url"] = cls.construct_url(post)
        post["priority"] = 0.8
        if render:
            cls.render_text(post)
            post["meta"]["images"] = cls.extract_images(post)
365843
protected function mapWebRoutes(): void
    {
        $file = $this->basePath.'routes/web.php';

        if (file_exists($file)) {
            $this->loadRoutesFrom(
                Route::middleware('web')
                ->group($file));
        }
    }
455801
function () {
			this._initAndBindSelectedContentModel();
			var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
			oRouter.getRoute("ContentDetails").attachMatched(this._onRouteMatched, this);
			oRouter.getRoute("ContentDetailsFlip").attachMatched(this._onRouteMatched, this);
		}
831802
function _processHeaders(siteDesc, prefix) {

    if (!siteDesc.headers) {
        return;
    }
    //console.log('headers', siteDesc.headers, 'prefix', prefix);
    let headers = siteDesc.headers;
    let isInSiteStructure = false;
    if (siteDescriptionReader.checkParams(siteDesc.requiredParams)) {
        isInSiteStructure = true;
    }
    for (let i in headers) {
        _processElement(headers[i], prefix, { isInSiteStructure: isInSiteStructure });
    }
}
507682
private function processHtml()
    {
        $this->tree->build_tree();

        $this->css->load_css_file(Stylesheet::getDefaultStylesheet(), Stylesheet::ORIG_UA);

        $acceptedmedia = Stylesheet::$ACCEPTED_GENERIC_MEDIA_TYPES;
        $acceptedmedia[] = $this->options->getDefaultMediaType();

        // <base href="" />
        $base_nodes = $this->dom->getElementsByTagName("base");
        if ($base_nodes->length && ($href = $base_nodes->item(0)->getAttribute("href"))) {
            list($this->protocol, $this->baseHost, $this->basePath) = Helpers::explode_url($href);
        }

        // Set the base path of the Stylesheet to that of the file being processed
        $this->css->set_protocol($this->protocol);
        $this->css->set_host($this->baseHost);
        $this->css->set_base_path($this->basePath);

        // Get all the stylesheets so that they are processed in document order
        $xpath = new DOMXPath($this->dom);
        $stylesheets = $xpath->query("//*[name() = 'link' or name() = 'style']");

        /** @var \DOMElement $tag */
        foreach ($stylesheets as $tag) {
            switch (strtolower($tag->nodeName)) {
                // load <link rel="STYLESHEET" ... /> tags
                case "link":
                    if (mb_strtolower(stripos($tag->getAttribute("rel"), "stylesheet") !== false) || // may be "appendix stylesheet"
                        mb_strtolower($tag->getAttribute("type")) === "text/css"
                    ) {
                        //Check if the css file is for an accepted media type
                        //media not given then always valid
                        $formedialist = preg_split("/[\s\n,]/", $tag->getAttribute("media"), -1, PREG_SPLIT_NO_EMPTY);
                        if (count($formedialist) > 0) {
                            $accept = false;
                            foreach ($formedialist as $type) {
                                if (in_array(mb_strtolower(trim($type)), $acceptedmedia)) {
                                    $accept = true;
                                    break;
                                }
                            }

                            if (!$accept) {
                                //found at least one mediatype, but none of the accepted ones
                                //Skip this css file.
                                break;
                            }
                        }

                        $url = $tag->getAttribute("href");
                        $url = Helpers::build_url($this->protocol, $this->baseHost, $this->basePath, $url);

                        $this->css->load_css_file($url, Stylesheet::ORIG_AUTHOR);
                    }
                    break;

                // load <style> tags
                case "style":
                    // Accept all <style> tags by default (note this is contrary to W3C
                    // HTML 4.0 spec:
                    // http://www.w3.org/TR/REC-html40/present/styles.html#adef-media
                    // which states that the default media type is 'screen'
                    if ($tag->hasAttributes() &&
                        ($media = $tag->getAttribute("media")) &&
                        !in_array($media, $acceptedmedia)
                    ) {
                        break;
                    }

                    $css = "";
                    if ($tag->hasChildNodes()) {
                        $child = $tag->firstChild;
                        while ($child) {
                            $css .= $child->nodeValue; // Handle <style><!-- blah --></style>
                            $child = $child->nextSibling;
                        }
                    } else {
                        $css = $tag->nodeValue;
                    }

                    $this->css->load_css($css, Stylesheet::ORIG_AUTHOR);
                    break;
            }
        }
    }
888800
function handleDescription(description, element, parent, spaces, marker) {
  const elementName = element.element;
  let str = '';

  // This flag determines when to use a block description within a list entry
  // instead of just ending the list entry line with the description. This
  // means that some other special values like `+ Properties` will get used
  // later during rendering.
  let useLongDescription = false;
  if (element.attributes &&
      (element.attributes.default !== undefined ||
       element.attributes.sample !== undefined)) {
    useLongDescription = true;
  }

  // Finally, an optional description
  if (description) {
    if (description.indexOf('\n') !== -1) {
      // Multiline description, so we can't use the short form!
      useLongDescription = true;
    }

    if (useLongDescription) {
      str += `\n${description}`;
    } else {
      str += ` - ${description}`;
    }
  }

  // Handle special list items like default/sample here as they are part
  // of the description, before the content (sub-elements) are rendere.
  const defaultValue = element.attributes &&
                       element.attributes.getValue('default');
  if (defaultValue !== undefined) {
    str += `\n${marker} Default: ${defaultValue}\n`;
  }

  const sampleValue = element.attributes &&
                      element.attributes.getValue('sample');
  if (sampleValue !== undefined) {
    str += `\n${marker} Sample: ${sampleValue}\n`;
  }

  // Now, depending on the content type, we will recursively handle child
  // elements within objects and arrays.
  if (element.content && element.content.length) {
    str += '\n';

    if (!parent) {
      // No parent implies a data structure or attribute definition, so
      // buffer it with an extra space.
      str += '\n';
    }

    const [renderedContent, objectLike] = handleContent(element, spaces, marker);

    if (!useLongDescription) {
      str += renderedContent;
    } else if (renderedContent.length) {
      // There is rendered content
      if (objectLike) {
        str += `\n${marker} Properties\n`;
      } else if (elementName === 'enum') {
        // An enum is a special case where the content is a list
        // but you use `Members` rather than `Items`.
        str += `\n${marker} Members\n`;
      } else {
        str += `\n${marker} Items\n`;
      }

      str += indent(renderedContent, spaces, {first: true});
    }
  }

  return str;
}
954461
function processTag(tag, targets) {
  if (tag.description) {
    tag.description = replaceLink(tag.description, targets);
  }
  if (tag.params) {
    tag.params.forEach(function (param) {
      if (param.description) {
        param.description = replaceLink(param.description, targets);
      }
    });
  }
  if (tag.members) {
    tag.members.forEach(function (member) {
      processTag(member, targets);
    });
  }
  if (tag.methods) {
    tag.methods.forEach(function (method) {
      processTag(method, targets);
    });
  }
}
246565
function() {
			var baseUrl = context.getGlobal('location').pathname;

			routerService = context.getService('router');
			routerService.init([
				baseUrl,
				baseUrl + 'active',
				baseUrl + 'completed'
			]);
		}
763927
private function gatherRoutesDefinitions()
    {
        $route = $this->findRouteByName($this->homeRouteName);
        $this->homeDefinition = new RouteDefinition($this->homeRouteName, $this->resolveRouteOptions($route, $this->homeRouteName));

        /** @var Route $route */
        foreach ($this->routes as $name => $route) {
            if ($this->homeRouteName !== $name && null !== $cms = $route->getOption('_cms')) {
                if (array_key_exists('name', $cms)) {
                    $this->createRouteDefinition($name, $route);
                }
            }
        }

        $this->homeDefinition->sortChildren();
    }
183335
def navigated
      url = get_location
      @params = []

      idx = match(path_to_parts(decode(url.pathname)), decode(url.search))

      if idx
        @routes[idx][:callback].call(@params)
      else
        @page404.call(url.pathname)
      end
    end
1313209
private void processRevisions()
	{
		logger.info("Processing revisions, extracting template information ...");
		RevisionIterator revisionIter=null;
		try{
			revisionIter = new RevisionIterator(dbConf);

			int revCounter = 0;
			while (revisionIter.hasNext()) {
				revCounter++;

				if (revCounter % VERBOSITY == 0) {
					logger.info("{} revisions processed ...", revCounter);
				}

				Revision curRevision = revisionIter.next();
				int curRevisionId = curRevision.getRevisionID();

				fillMapWithTemplateData(curRevision.getRevisionText(),
						revisionFilter, curRevisionId, TPLNAME_TO_REVISIONIDS);
			}
		}catch(WikiApiException e){
			logger.error("Error initializing Revision Iterator", e);
		}finally{
			if(revisionIter!=null){
				try{
					revisionIter.close();
				}catch(SQLException e){
					logger.error("Error closing RevisionIterator", e);
				}
			}
		}
	}
80883
public function process()
    {
        $saIni = $this->getSiteAccessIni();
        $this->destinationLocale = $saIni->variable( 'RegionalSettings', 'ContentObjectLocale' );

        // Detect the type of siteaccess we are dealing with. Initially URI and Host are supported.
        // We don't want the siteaccess part here, since we are inserting our siteaccess name.
        $indexFile = trim( eZSys::indexFile( false ), '/' );
        switch ( $GLOBALS['eZCurrentAccess']['type'] )
        {
            case eZSiteAccess::TYPE_URI:
                eZURI::transformURI( $host, true, 'full' );
                break;

            default:
                $host = $saIni->variable( 'SiteSettings', 'SiteURL' );
                $host = eZSys::serverProtocol()."://".$host;
                break;
        }
        $this->baseDestinationUrl = "{$host}{$indexFile}";
    }