Use a closure instead of PathRouterPatternReplacer
authorTim Starling <tstarling@wikimedia.org>
Fri, 6 Jul 2018 05:53:26 +0000 (15:53 +1000)
committerTim Starling <tstarling@wikimedia.org>
Wed, 11 Jul 2018 00:54:35 +0000 (10:54 +1000)
commit8943c222215a24aafabe8a78d4db7c901650373e
tree2df63cf1de7d06625b1b51a8736867c1edfd1517
parent874f5f7f0a959f09c43c5408e04d20bce4a426b5
Use a closure instead of PathRouterPatternReplacer

In PHP 5.3+ it's simpler to use closures rather than a replacer class to
pass parameters through to the preg_replace_callback() callback.

Remove without deprecation internal class PathRouterPatternReplacer,
unused in core and Gerrit-hosted extensions.

The new implementation is very similar, except that I renamed some
variables for clarity.

Also fixed an incorrect doc comment parameter type.

Change-Id: I4cd3c0162acdb02d51ab5b7f03b0a16e0a818d99
autoload.php
includes/PathRouter.php