public function splitWithContentIdKey($pattern, $string)
    {
        $array    = [];
        $exploded = explode($pattern, $string);
        foreach ($exploded as $key => $value) {
            $response  = new HttpResponse($value);
            $contentId = $response->getHeader('Content-Id');

            if (null !== $contentId) {
                $array[$contentId] = $value;
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
public function splitWithContentIdKey($pattern, $string)
    {
        $array    = [];
        $exploded = explode($pattern, $string);
        foreach ($exploded as $key => $value) {
            $response  = new HttpResponse($value);
            $contentId = $response->getHeader('Content-Id');

            if (null !== $contentId) {
                $array[$contentId] = $value;
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
public function splitWithContentIdKey ( $ pattern , $ string ) { $ array = [ ] ; $ exploded = explode ( $ pattern , $ string ) ; foreach ( $ exploded as $ key => $ value ) { $ response = new HttpResponse ( $ value ) ; $ contentId = $ response -> getHeader ( 'Content-Id' ) ; if ( null !== $ contentId ) { $ array [ $ contentId ] = $ value ; } else { $ array [ $ key ] = $ value ; } } return $ array ; }
Split batch request and use ContentId as array key

@param mixed $pattern
@param mixed $string

@return array $array - Array of batch-parts

@throws \ArangoDBClient\ClientException
Split batch request and use ContentId as array key