Guest User

Untitled

a guest
Feb 17th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. class PathProcessor implements InboundPathProcessorInterface, OutboundPathProcessorInterface {
  2.  
  3. public function processInbound($path, Request $request) {
  4. if (strpos($path, '/follower') === 0) {
  5. $path = preg_replace('#^/follower#', '/member', $path);
  6. }
  7. return $path;
  8. }
  9.  
  10. public function processOutbound($path, &$options = array(), Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
  11. if (strpos($path, '/member') === 0) {
  12. $path = preg_replace('#^/member#', '/follower', $path);
  13. }
  14. return $path;
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment