protected function makeFilePathFromRequest(ServiceRequestInterface $request)
    {
        $location = $request->getLocation();
        $method   = $request->getMethod();

        if ( ! empty($location) && ! empty($method)) {

            return rtrim($location(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $method();
        }

        if ( ! empty($location)) return $location;

        if ( ! empty($method)) return $method;

        throw new CouldNotConnectException(
            'No path given for FileService. Set a location and/or method to build a valid path.'
        );
    }
protected function makeFilePathFromRequest(ServiceRequestInterface $request)
    {
        $location = $request->getLocation();
        $method   = $request->getMethod();

        if ( ! empty($location) && ! empty($method)) {

            return rtrim($location(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $method();
        }

        if ( ! empty($location)) return $location;

        if ( ! empty($method)) return $method;

        throw new CouldNotConnectException(
            'No path given for FileService. Set a location and/or method to build a valid path.'
        );
    }
protected function makeFilePathFromRequest ( ServiceRequestInterface $ request ) { $ location = $ request -> getLocation ( ) ; $ method = $ request -> getMethod ( ) ; if ( ! empty ( $ location ) && ! empty ( $ method ) ) { return rtrim ( $ location ( ) , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . $ method ( ) ; } if ( ! empty ( $ location ) ) return $ location ; if ( ! empty ( $ method ) ) return $ method ; throw new CouldNotConnectException ( 'No path given for FileService. Set a location and/or method to build a valid path.' ) ; }
Builds an returns local file path from current request

Path may be a combination of the location and the method
location may be the full file path and method may then be empty

@param ServiceRequestInterface $request
@return string
@throws CouldNotConnectException
Builds an returns local file path from current request