Themosis\Route\Route::createRewriteRule PHP Method

createRewriteRule() public method

By registering a rewrite rule using the route's regex we force WordPress not to change the url to one Wordpress knows.
public createRewriteRule ( )
    public function createRewriteRule()
    {
        if (!$this->condition()) {
            // Compile the route to get a Symfony compiled route
            $this->compileRoute();
            // Retrieve the regex to use of registering the rewrite rule for this route
            $regex = $this->getRewriteRuleRegex();
            // Add the rewrite rule to the top
            add_action('init', function () use($regex) {
                add_rewrite_tag('%is_' . $this->rewrite_tag_prefix . '_route%', '(\\d)');
                add_rewrite_rule($regex, 'index.php?is_' . $this->rewrite_tag_prefix . '_route=1', 'top');
            });
        }
    }