protected function getBoundaryAndChildStreams(ParentHeaderPart $part)
    {
        $boundary = $part->getHeaderParameter('Content-Type', 'boundary');
        if ($boundary === null) {
            return array_map(
                function ($child) {
                    return $child->getStream();
                },
                $part->getChildParts()
            );
        }
        $streams = [];
        foreach ($part->getChildParts() as $i => $child) {
            if ($i !== 0 || $part->hasContent()) {
                $streams[] = Psr7\stream_for("\r\n");
            }
            $streams[] = Psr7\stream_for("--$boundary\r\n");
            $streams[] = $child->getStream();
        }
        $streams[] = Psr7\stream_for("\r\n--$boundary--\r\n");
        
        return $streams;
    }
protected function getBoundaryAndChildStreams(ParentHeaderPart $part)
    {
        $boundary = $part->getHeaderParameter('Content-Type', 'boundary');
        if ($boundary === null) {
            return array_map(
                function ($child) {
                    return $child->getStream();
                },
                $part->getChildParts()
            );
        }
        $streams = [];
        foreach ($part->getChildParts() as $i => $child) {
            if ($i !== 0 || $part->hasContent()) {
                $streams[] = Psr7\stream_for("\r\n");
            }
            $streams[] = Psr7\stream_for("--$boundary\r\n");
            $streams[] = $child->getStream();
        }
        $streams[] = Psr7\stream_for("\r\n--$boundary--\r\n");
        
        return $streams;
    }
protected function getBoundaryAndChildStreams ( ParentHeaderPart $ part ) { $ boundary = $ part -> getHeaderParameter ( 'Content-Type' , 'boundary' ) ; if ( $ boundary === null ) { return array_map ( function ( $ child ) { return $ child -> getStream ( ) ; } , $ part -> getChildParts ( ) ) ; } $ streams = [ ] ; foreach ( $ part -> getChildParts ( ) as $ i => $ child ) { if ( $ i !== 0 || $ part -> hasContent ( ) ) { $ streams [ ] = Psr7 \ stream_for ( "\r\n" ) ; } $ streams [ ] = Psr7 \ stream_for ( "--$boundary\r\n" ) ; $ streams [ ] = $ child -> getStream ( ) ; } $ streams [ ] = Psr7 \ stream_for ( "\r\n--$boundary--\r\n" ) ; return $ streams ; }
Creates an array of streams based on the attached part's mime boundary
and child streams.

@param ParentHeaderPart $part passed in because $this->part is declared
as MessagePart
@return StreamInterface[]
Creates an array of streams based on the attached part s mime boundary and child streams .