lib/classes/Swift/Transport/StreamBuffer.php
protected function doCommit($bytes)
    {
        if (isset($this->in)) {
            $bytesToWrite = strlen($bytes);
            $totalBytesWritten = 0;

            while ($totalBytesWritten < $bytesToWrite) {
                $bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
                if (false === $bytesWritten || 0 === $bytesWritten) {
                    break;
                }

                $totalBytesWritten += $bytesWritten;
            }

            if ($totalBytesWritten > 0) {
                return ++$this->sequence;
            }
        }
    }
protected function doCommit($bytes)
    {
        if (isset($this->in)) {
            $bytesToWrite = strlen($bytes);
            $totalBytesWritten = 0;

            while ($totalBytesWritten < $bytesToWrite) {
                $bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten));
                if (false === $bytesWritten || 0 === $bytesWritten) {
                    break;
                }

                $totalBytesWritten += $bytesWritten;
            }

            if ($totalBytesWritten > 0) {
                return ++$this->sequence;
            }
        }
    }
protected function doCommit ( $ bytes ) { if ( isset ( $ this -> in ) ) { $ bytesToWrite = strlen ( $ bytes ) ; $ totalBytesWritten = 0 ; while ( $ totalBytesWritten < $ bytesToWrite ) { $ bytesWritten = fwrite ( $ this -> in , substr ( $ bytes , $ totalBytesWritten ) ) ; if ( false === $ bytesWritten || 0 === $ bytesWritten ) { break ; } $ totalBytesWritten += $ bytesWritten ; } if ( $ totalBytesWritten > 0 ) { return ++ $ this -> sequence ; } } }
Write this bytes to the stream
Write this bytes to the stream