final public function setSeparator($separator)
    {
        if (!is_string($separator)) {
            throw new InvalidArgumentException(
                'Separator must be a string'
            );
        }

        if (strlen($separator) > 1) {
            throw new InvalidArgumentException(
                'Separator must be one-character, or empty'
            );
        }

        $this->separator = $separator;
        return $this;
    }
final public function setSeparator($separator)
    {
        if (!is_string($separator)) {
            throw new InvalidArgumentException(
                'Separator must be a string'
            );
        }

        if (strlen($separator) > 1) {
            throw new InvalidArgumentException(
                'Separator must be one-character, or empty'
            );
        }

        $this->separator = $separator;
        return $this;
    }
final public function setSeparator ( $ separator ) { if ( ! is_string ( $ separator ) ) { throw new InvalidArgumentException ( 'Separator must be a string' ) ; } if ( strlen ( $ separator ) > 1 ) { throw new InvalidArgumentException ( 'Separator must be one-character, or empty' ) ; } $ this -> separator = $ separator ; return $ this ; }
Sets the token for traversing a data-tree.

@param  string $separator The single-character token to delimit nested data.
If the token is an empty string, data-tree traversal is disabled.
@throws InvalidArgumentException If the $separator is invalid.
@return self
Sets the token for traversing a data - tree .