private function splitData(string &$str)
    {
        if ($str === '') {
            return $str;
        }

        $replace = function (&$string) {

            if (\strpos($string, $this->symbUnescapedRel) !== false) {
                $string = \preg_replace(
                    self::$DELIMITER . $this->symbRel . "(?=" . $this->symbRel . ")|" . $this->symbRel . "(?=" . $this->sepData . ")|" . $this->symbRel . "(?=" . $this->sepComp . ")|" . $this->symbRel . "(?=" . $this->symbEnd . ")" . self::$DELIMITER,
                    '',
                    $string
                );
            }

            return \str_replace(
                $this->stringSafe,
                $this->symbUnescapedRel,
                $string
            );
        };

        // check for "sepUnescapedComp" in the string
        if (\strpos($str, $this->sepUnescapedComp) === false) {
            return $replace($str);
        }

        // split on "sepComp" if not escaped (negative lookbehind)
        $array = \preg_split(
            self::$DELIMITER . "(?<!" . $this->symbRel . ")" . $this->sepComp . self::$DELIMITER,
            $str
        );
        // fallback
        if ($array === false) {
            $array = [[]];
        }

        if (\count($array) === 1) {
            return $replace($str);
        }

        foreach ($array as &$value) {
            $value = $replace($value);
        }

        return $array;
    }
private function splitData(string &$str)
    {
        if ($str === '') {
            return $str;
        }

        $replace = function (&$string) {

            if (\strpos($string, $this->symbUnescapedRel) !== false) {
                $string = \preg_replace(
                    self::$DELIMITER . $this->symbRel . "(?=" . $this->symbRel . ")|" . $this->symbRel . "(?=" . $this->sepData . ")|" . $this->symbRel . "(?=" . $this->sepComp . ")|" . $this->symbRel . "(?=" . $this->symbEnd . ")" . self::$DELIMITER,
                    '',
                    $string
                );
            }

            return \str_replace(
                $this->stringSafe,
                $this->symbUnescapedRel,
                $string
            );
        };

        // check for "sepUnescapedComp" in the string
        if (\strpos($str, $this->sepUnescapedComp) === false) {
            return $replace($str);
        }

        // split on "sepComp" if not escaped (negative lookbehind)
        $array = \preg_split(
            self::$DELIMITER . "(?<!" . $this->symbRel . ")" . $this->sepComp . self::$DELIMITER,
            $str
        );
        // fallback
        if ($array === false) {
            $array = [[]];
        }

        if (\count($array) === 1) {
            return $replace($str);
        }

        foreach ($array as &$value) {
            $value = $replace($value);
        }

        return $array;
    }
private function splitData ( string & $ str ) { if ( $ str === '' ) { return $ str ; } $ replace = function ( & $ string ) { if ( \ strpos ( $ string , $ this -> symbUnescapedRel ) !== false ) { $ string = \ preg_replace ( self :: $ DELIMITER . $ this -> symbRel . "(?=" . $ this -> symbRel . ")|" . $ this -> symbRel . "(?=" . $ this -> sepData . ")|" . $ this -> symbRel . "(?=" . $ this -> sepComp . ")|" . $ this -> symbRel . "(?=" . $ this -> symbEnd . ")" . self :: $ DELIMITER , '' , $ string ) ; } return \ str_replace ( $ this -> stringSafe , $ this -> symbUnescapedRel , $ string ) ; } ; // check for "sepUnescapedComp" in the string if ( \ strpos ( $ str , $ this -> sepUnescapedComp ) === false ) { return $ replace ( $ str ) ; } // split on "sepComp" if not escaped (negative lookbehind) $ array = \ preg_split ( self :: $ DELIMITER . "(?<!" . $ this -> symbRel . ")" . $ this -> sepComp . self :: $ DELIMITER , $ str ) ; // fallback if ( $ array === false ) { $ array = [ [ ] ] ; } if ( \ count ( $ array ) === 1 ) { return $ replace ( $ str ) ; } foreach ( $ array as & $ value ) { $ value = $ replace ( $ value ) ; } return $ array ; }
Composite data element

@param string $str

@return mixed
Composite data element