Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PathProcessor implements InboundPathProcessorInterface, OutboundPathProcessorInterface {
- public function processInbound($path, Request $request) {
- if (strpos($path, '/follower') === 0) {
- $path = preg_replace('#^/follower#', '/member', $path);
- }
- return $path;
- }
- public function processOutbound($path, &$options = array(), Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
- if (strpos($path, '/member') === 0) {
- $path = preg_replace('#^/member#', '/follower', $path);
- }
- return $path;
- }
- }
Add Comment
Please, Sign In to add comment