daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top