Look up the route in the index and use that to retrieve the filtered
content.

@param array  &$content   to process.
@param object &$filtered to use for settings.

@return array with content and filtered version.
515827
private function processMainContentPhaseTwo(&$content, &$filtered)
    {
        // From configuration
        $filter = $this->config["textfilter"];
        $revisionStart = $this->config["revision-history"]["start"];
        $revisionEnd   = $this->config["revision-history"]["end"];
        $revisionClass = $this->config["revision-history"]["class"];
        $revisionSource = isset($this->config["revision-history"]["source"])
            ? $this->config["revision-history"]["source"]
            : null;

        $textFilter = $this->di->get("textFilter");
        $text = $filtered->text;

        // Check if revision history is to be included
        if (isset($content["views"]["main"]["data"]["revision"])) {
            $text = $textFilter->addRevisionHistory(
                $text,
                $content["views"]["main"]["data"]["revision"],
                $revisionStart,
                $revisionEnd,
                $revisionClass,
                $revisionSource . "/" . $content["file"]
            );
        }

        // Get new filtered content (and updated frontmatter)
        // Title in frontmatter overwrites title found in content
        $new = $textFilter->parse($text, $filter);
        $filtered->text = $new->text;
         
        // Keep title if defined in frontmatter
        $title = isset($filtered->frontmatter["title"])
          ? $filtered->frontmatter["title"]
          : null;

        $filtered->frontmatter = array_merge_recursive_distinct(
            $filtered->frontmatter,
            $new->frontmatter
        );

        if ($title) {
            $filtered->frontmatter["title"] = $title;
        }

        // Main data is
        $data = &$content["views"]["main"]["data"];

        // Update all anchor urls to use baseurl, needs info about baseurl
        // from merged frontmatter
        $baseurl = isset($data["baseurl"])
          ? $data["baseurl"]
          : null;
        $this->addBaseurl2AnchorUrls($filtered, $baseurl);
        $this->addBaseurl2ImageSource($filtered, $baseurl);

        // Add excerpt and hasMore, if available
        $textFilter->addExcerpt($filtered);

        // Load details on author, if set.
        if (isset($data["author"])) {
            $data["author"] = $this->loadAuthorDetails($data["author"]);
        }

        // Load details on category, if set.
        if (isset($data["category"])) {
            $data["category"] = $this->loadCategoryDetails($data["category"]);
        }
    }
1243337
public function getHttpPushHeaders(string $content): array
    {
        $headers = [];
        /** @var ConfigurationService $configurationService */
        $configurationService = GeneralUtility::makeInstance(ConfigurationService::class);
        if ($configurationService->isBool('sendHttp2PushEnable')) {
            $limit = (int)$configurationService->get('sendHttp2PushFileLimit');
            $extensions = GeneralUtility::trimExplode(',', (string)$configurationService->get('sendHttp2PushFileExtensions'), true);
            $handlers = $this->getHttpPushHandler();

            foreach ($extensions as $extension) {
                foreach ($handlers as $handler) {
                    /** @var AbstractHttpPush $handler */
                    if ($handler->canHandleExtension($extension)) {
                        $headers = \array_merge($headers, $handler->getHeaders($content));
                    }
                }
            }

            $headers = \array_slice($headers, 0, $limit);
        }

        return $headers;
    }
364338
protected function preFilterRoutes(Request $request, RouteCollectionInterface $routes)
    {
        if ($routes instanceof CachedCollection && $sRoutes = $routes->findByStaticPath($request->getPath())) {
            $routes = 0 !== count($sRoutes->all()) ? $sRoutes : $routes;
        }

        return $routes->findByMethod($request->getMethod());
    }
982089
protected function parse($content)
    {
        $result = array();
        foreach ($this->parsers as $parser) {
            $nodes = $parser->getNodes($content);
            if (!$nodes) {
                continue;
            }

            foreach ($nodes as $node) {
                $result[] = $node;
            }
        }

        return $result;
    }
1361167
protected function decodeContent(string $content): array
    {
        $result = json_decode($content, true);
        return is_array($result) ? $result : [];
    }
1191419
protected function _getIndexDefinitions( $content )
	{
		$defs = array( );
		$matches = array( );

		if ( preg_match_all('/CREATE [a-zA-Z]* ?INDEX \"?([a-zA-Z0-9_]+)\"? ON \"?([a-zA-Z0-9_]+)\"? .+(\n\n|$)/sU', $content, $matches, PREG_SET_ORDER) === false ) {
			throw new MW_Setup_Exception('Unable to get index definitions');
		}

		foreach ( $matches as $match ) {
			$name = $match[2] . '.' . $match[1];
			$defs[$name] = $match[0];
		}

		return $defs;
	}
330605
public static cacheforwardproxy[] get_filtered(nitro_service service, String filter) throws Exception{
		cacheforwardproxy obj = new cacheforwardproxy();
		options option = new options();
		option.set_filter(filter);
		cacheforwardproxy[] response = (cacheforwardproxy[]) obj.getfiltered(service, option);
		return response;
	}
367077
public function decode_content($content) {
        if (!$content = $this->precheck_content($content)) { // Perform some prechecks
            return false;
        }
        // Iterate over all rules, chaining results
        foreach ($this->rules as $rule) {
            $content = $rule->decode($content);
        }
        return $content;
    }
41603
protected function getHtml( $content )
	{
		$site = Route::input( 'site', Input::get( 'site', 'default' ) );
		return View::make( 'shop::jqadm.index', array( 'content' => $content, 'site' => $site ) );
	}
928132
protected function getPages($content)
    {
        if ($content instanceof Pages) {
            return $content;
        }
        elseif ($content instanceof Site) {
            return $content->index();
        }
        else {
            $pages = new Pages([]);
            if ($content instanceof Page) $pages->add($content);
            return $pages;
        }
    }
994917
public function mapContent(Content $content)
    {
        $locations = $this->locationHandler->loadLocationsByContent($content->versionInfo->contentInfo->id);
        $section = $this->sectionHandler->load($content->versionInfo->contentInfo->sectionId);
        $mainLocation = null;
        $locationDocuments = array();
        foreach ($locations as $location) {
            $locationDocuments[] = $this->mapContentLocation($location, $content);
        }

        // UserGroups and Users are Content, but permissions cascade is achieved through
        // Locations hierarchy. We index all ancestor Location Content ids of all
        // Locations of an owner.
        $ancestorLocationsContentIds = $this->getAncestorLocationsContentIds(
            $content->versionInfo->contentInfo->ownerId
        );
        // Add owner user id as it can also be considered as user group.
        $ancestorLocationsContentIds[] = $content->versionInfo->contentInfo->ownerId;

        $fields = array(
            new Field(
                'id',
                $content->versionInfo->contentInfo->id,
                new FieldType\IdentifierField()
            ),
            new Field(
                'type',
                $content->versionInfo->contentInfo->contentTypeId,
                new FieldType\IdentifierField()
            ),
            new Field(
                'version',
                $content->versionInfo->versionNo,
                new FieldType\IdentifierField()
            ),
            new Field(
                'status',
                $content->versionInfo->status,
                new FieldType\IdentifierField()
            ),
            new Field(
                'name',
                $content->versionInfo->contentInfo->name,
                new FieldType\StringField()
            ),
            new Field(
                'creator',
                $content->versionInfo->creatorId,
                new FieldType\IdentifierField()
            ),
            new Field(
                'owner',
                $content->versionInfo->contentInfo->ownerId,
                new FieldType\IdentifierField()
            ),
            new Field(
                'owner_user_group',
                $ancestorLocationsContentIds,
                new FieldType\MultipleIdentifierField()
            ),
            new Field(
                'section',
                $content->versionInfo->contentInfo->sectionId,
                new FieldType\IdentifierField()
            ),
            new Field(
                'section_identifier',
                $section->identifier,
                new FieldType\IdentifierField()
            ),
            new Field(
                'section_name',
                $section->name,
                new FieldType\StringField()
            ),
            new Field(
                'remote_id',
                $content->versionInfo->contentInfo->remoteId,
                new FieldType\IdentifierField()
            ),
            new Field(
                'modified',
                $content->versionInfo->contentInfo->modificationDate,
                new FieldType\DateField()
            ),
            new Field(
                'published',
                $content->versionInfo->contentInfo->publicationDate,
                new FieldType\DateField()
            ),
            new Field(
                'language_code',
                array_keys($content->versionInfo->names),
                new FieldType\MultipleStringField()
            ),
            new Field(
                'always_available',
                $content->versionInfo->contentInfo->alwaysAvailable,
                new FieldType\BooleanField()
            ),
            new Field(
                'locations',
                $locationDocuments,
                new FieldType\DocumentField()
            ),
        );

        $contentType = $this->contentTypeHandler->load($content->versionInfo->contentInfo->contentTypeId);
        $fields[] = new Field(
            'group',
            $contentType->groupIds,
            new FieldType\MultipleIdentifierField()
        );
        $fields[] = new Field(
            'fields',
            $this->mapFields($content, $contentType),
            new FieldType\DocumentField()
        );

        $fields[] = new Field(
            'object_state',
            $this->getObjectStateIds($content->versionInfo->contentInfo->id),
            new FieldType\MultipleIdentifierField()
        );

        $document = new Document(
            array(
                'id' => $content->versionInfo->contentInfo->id,
                'type' => 'content',
                'fields' => $fields,
            )
        );

        return $document;
    }
379417
protected static function addRoute($content)
    {
        $Root = Process::root;
        $RouterFile = $Root.'app/http/Routes.php';
        //
        file_put_contents($RouterFile, $content, FILE_APPEND | LOCK_EX);
    }
1280739
public static function parseFilters($filters)
	{
		return array_build(static::explodeFilters($filters), function($key, $value)
		{
			return Route::parseFilter($value);
		});
	}
1102143
public function filter($content, array $options = array())
    {
        $metadata = $this->property->getMetadata();

        $mediaElement = $metadata->offsetExists('media')
            ? $metadata->get('media')->getReferencedElement()
            : null;

        if ($mediaElement === null) {
            return null;
        }

        if ($mediaElement instanceof ImageReferencedElement) {
            return $this->handleImageElement($mediaElement);
        } elseif ($mediaElement instanceof MediaReferencedElement) {
            return $this->handleMediaElement($mediaElement);
        } else {
            return null;
        }
    }
1020561
public static function findExternalLinks($content)
    {
        $matches = null;
        preg_match_all('/(?:href|src)=\"([^\"]+)/', $content, $matches);

        if (empty($matches[1])) {
            return [];
        }

        return $matches[1];
    }
4853
public function purify($content)
	{
		if(is_array($content))
			$content=array_map(array($this,'purify'),$content);
		else
			$content=$this->getPurifier()->purify($content);
		return $content;
	}
282582
public static route[] get_filtered(nitro_service service, String filter) throws Exception{
		route obj = new route();
		options option = new options();
		option.set_filter(filter);
		route[] response = (route[]) obj.getfiltered(service, option);
		return response;
	}