src/PathSegmentsAwareTrait.php
protected function _setPathSegments($segments)
    {
        /*
         * `PathSegmentsAwareInterface#getPathSegments()` disallows `stdClass`.
         */
        if ($segments instanceof stdClass) {
            $segments = (array) $segments;
        }

        $segments = $this->_normalizeIterable($segments);

        $this->pathSegments = $segments;
    }
protected function _setPathSegments($segments)
    {
        /*
         * `PathSegmentsAwareInterface#getPathSegments()` disallows `stdClass`.
         */
        if ($segments instanceof stdClass) {
            $segments = (array) $segments;
        }

        $segments = $this->_normalizeIterable($segments);

        $this->pathSegments = $segments;
    }
Sets the path segments.

@since [*next-version*]

@param string[]|Stringable[]|Traversable|stdClass $segments A list of path segments.