src/Guzzle/Http/EntityBody.php
public static function fromString($string)
    {
        $stream = fopen('php://temp', 'r+');
        if ($string !== '') {
            fwrite($stream, $string);
            rewind($stream);
        }

        return new static($stream);
    }
public static function fromString($string)
    {
        $stream = fopen('php://temp', 'r+');
        if ($string !== '') {
            fwrite($stream, $string);
            rewind($stream);
        }

        return new static($stream);
    }
public static function fromString ( $ string ) { $ stream = fopen ( 'php://temp' , 'r+' ) ; if ( $ string !== '' ) { fwrite ( $ stream , $ string ) ; rewind ( $ stream ) ; } return new static ( $ stream ) ; }
Create a new EntityBody from a string

@param string $string String of data

@return EntityBody
Create a new EntityBody from a string