src/mock/MockResponse.php
public static function getPath($url)
    {
        $matchFound = preg_match('/(\/v[23]\/.*$)/', $url, $matches);
        if( ! $matchFound || ! is_array($matches) || ! isset($matches[1])) {
            throw new \Exception('Unable to parse url path', 1462733286);
        }

        return $matches[1];
    }
public static function getPath($url)
    {
        $matchFound = preg_match('/(\/v[23]\/.*$)/', $url, $matches);
        if( ! $matchFound || ! is_array($matches) || ! isset($matches[1])) {
            throw new \Exception('Unable to parse url path', 1462733286);
        }

        return $matches[1];
    }
public static function getPath ( $ url ) { $ matchFound = preg_match ( '/(\/v[23]\/.*$)/' , $ url , $ matches ) ; if ( ! $ matchFound || ! is_array ( $ matches ) || ! isset ( $ matches [ 1 ] ) ) { throw new \ Exception ( 'Unable to parse url path' , 1462733286 ) ; } return $ matches [ 1 ] ; }
Parse request path out of url
@param string $url
@return string
@throws \Exception
Parse request path out of url