public function write($string) : int
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnwritableStreamException('Stream is not resourceable');
		}

		if (! $this->isWritable())
		{
			throw new Exception\UnwritableStreamException('Stream is not writable');
		}

		$result = \fwrite($this->resource, $string);

		if (false === $result)
		{
			throw new Exception\UnwritableStreamException('Unable to write to the stream');
		}

		return $result;
	}
public function write($string) : int
	{
		if (! \is_resource($this->resource))
		{
			throw new Exception\UnwritableStreamException('Stream is not resourceable');
		}

		if (! $this->isWritable())
		{
			throw new Exception\UnwritableStreamException('Stream is not writable');
		}

		$result = \fwrite($this->resource, $string);

		if (false === $result)
		{
			throw new Exception\UnwritableStreamException('Unable to write to the stream');
		}

		return $result;
	}
public function write ( $ string ) : int { if ( ! \ is_resource ( $ this -> resource ) ) { throw new Exception \ UnwritableStreamException ( 'Stream is not resourceable' ) ; } if ( ! $ this -> isWritable ( ) ) { throw new Exception \ UnwritableStreamException ( 'Stream is not writable' ) ; } $ result = \ fwrite ( $ this -> resource , $ string ) ; if ( false === $ result ) { throw new Exception \ UnwritableStreamException ( 'Unable to write to the stream' ) ; } return $ result ; }
Writes the given string to the stream

Returns the number of bytes written to the stream.

@param string $string

@return int

@throws Exception\UnwritableStreamException

@link http://php.net/manual/en/function.fwrite.php
Writes the given string to the stream