private function parsePathParts(Request $request)
    {
        if (empty($this->apiUrlPath)) {
            throw new \Exception(self::ERROR_NO_API_BASE_PATH);
        }

        // Resolving not knowing whether the base contains a domain.
        $base = explode('/', $this->apiUrlPath);
        $path = explode('/', $request->getPathInfo());

        return array_values(array_diff($path, $base));
    }
private function parsePathParts(Request $request)
    {
        if (empty($this->apiUrlPath)) {
            throw new \Exception(self::ERROR_NO_API_BASE_PATH);
        }

        // Resolving not knowing whether the base contains a domain.
        $base = explode('/', $this->apiUrlPath);
        $path = explode('/', $request->getPathInfo());

        return array_values(array_diff($path, $base));
    }
private function parsePathParts ( Request $ request ) { if ( empty ( $ this -> apiUrlPath ) ) { throw new \ Exception ( self :: ERROR_NO_API_BASE_PATH ) ; } // Resolving not knowing whether the base contains a domain. $ base = explode ( '/' , $ this -> apiUrlPath ) ; $ path = explode ( '/' , $ request -> getPathInfo ( ) ) ; return array_values ( array_diff ( $ path , $ base ) ) ; }
The "router" Symfony service cannot be used, regretably.
@param Request $request
@return array
The router Symfony service cannot be used regretably .