public function write($string) {

            if (!$this->isWritable() || ($written = fwrite($this->stream, $string)) === false) {
                throw new \RuntimeException('Could not write in a not writable stream');
            }

            return $written;

        }
public function write($string) {

            if (!$this->isWritable() || ($written = fwrite($this->stream, $string)) === false) {
                throw new \RuntimeException('Could not write in a not writable stream');
            }

            return $written;

        }
public function write ( $ string ) { if ( ! $ this -> isWritable ( ) || ( $ written = fwrite ( $ this -> stream , $ string ) ) === false ) { throw new \ RuntimeException ( 'Could not write in a not writable stream' ) ; } return $ written ; }
Write within the stream
@param     string      $string         String to write
@return    string      Returns the written string
Write within the stream