public function getRoute(RequestInterface $request)
    {
        $route = $request->getUri()->__toString();
        if ($request->getMethod() === 'DELETE' && strpos($request->getUri(), 'messages') !== false) {
            $route = 'DELETE-'.$request->getUri();
        }

        return $route;
    }
public function getRoute(RequestInterface $request)
    {
        $route = $request->getUri()->__toString();
        if ($request->getMethod() === 'DELETE' && strpos($request->getUri(), 'messages') !== false) {
            $route = 'DELETE-'.$request->getUri();
        }

        return $route;
    }
public function getRoute ( RequestInterface $ request ) { $ route = $ request -> getUri ( ) -> __toString ( ) ; if ( $ request -> getMethod ( ) === 'DELETE' && strpos ( $ request -> getUri ( ) , 'messages' ) !== false ) { $ route = 'DELETE-' . $ request -> getUri ( ) ; } return $ route ; }
Returns the route for the current URL.

@param RequestInterface $request

@return \Psr\Http\Message\UriInterface|string
Returns the route for the current URL .