Skip to content

Instantly share code, notes, and snippets.

@kasimi
Last active April 5, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasimi/7b59194071764a66e46eb63c6af4eb53 to your computer and use it in GitHub Desktop.
Save kasimi/7b59194071764a66e46eb63c6af4eb53 to your computer and use it in GitHub Desktop.
Get phpBB route with parameter placeholders
<?php
/**
* Required services: @config, @path_helper, @router
*
* @param string $route_name
* @return string
*/
public function get_raw_route($route_name)
{
$app_php = $this->config['enable_mod_rewrite'] ? '' : '/app.' . $this->path_helper->get_php_ext();
return generate_board_url() . $app_php . $this->router->get_routes()->get($route_name)->getPath();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment