(non-PHPdoc)
@see \MwbExporter\Writer\WriterInterface::write()
551353
public function write()
    {
        if (!$this->opened) {
            throw new \RuntimeException('Writer is not opened.');
        }
        $args = func_get_args();
        if (count($args) > 1) {
            $line = call_user_func_array('sprintf', $args);
        } else {
            $line = $args[0];
        }
        $lines = explode("\n", $line);
        foreach ($lines as $line) {
            if ($line) {
                $line = $this->getIndentation().$line;
            }
            $this->buffer[] = $line;
        }

        return $this;
    }
95584
public function write($string)
    {
        $converted = $this->converter->convert($string, $this->stringCharset, $this->streamCharset);
        $written = $this->converter->getLength($converted, $this->streamCharset);
        $this->position += $written;
        return $this->stream->write($converted);
    }
719955
public function write($arg)
    {
        $this->check_closed();
        if (is_string($arg))
            return $this->append_str($arg);
        throw new IOException(
            sprintf('write argument must be a string: (%s) %s',
                gettype($arg), var_export($arg, true)));
    }
1093660
public function write($string)
    {
        if (!$this->isWritable()) {
            throw new \RuntimeException("Stream isn't writable");
        }
        
        $ret = fwrite($this->handle, $string);
        
        if ($ret === false) {
            throw new \RuntimeException("Failed to write to stream");
        }
        
        return $ret;
    }
726820
public function stream_write($data)
    {
        $tmp = &$this->_data[$this->_datapos];

        $oldlen = $tmp['l'];
        $res = fwrite($tmp['fp'], $data);
        if ($res === false) {
            return false;
        }

        $tmp['p'] = ftell($tmp['fp']);
        if ($tmp['p'] > $oldlen) {
            $tmp['l'] = $tmp['p'];
            $this->_length += ($tmp['l'] - $oldlen);
        }

        return $res;
    }
974835
public function write()
	{
		$writer	= new XML_DOM_FileWriter( $this->fileName );
		$root	= new XML_DOM_Node( $this->getOption( 'tag_root' ) );
		$this->writeRecursive( $root, $this->storage );
		return $writer->write( $root );
	}
1169963
public function write($data)
    {
        if (!$this->connected && !$this->connect()) {
            return false;
        }
        $totalBytes = strlen($data);
        $written = 0;
        while ($written < $totalBytes) {
            $rv = fwrite($this->connection, substr($data, $written));
            if ($rv === false || $rv === 0) {
                return $written;
            }
            $written += $rv;
        }

        return $written;
    }
528097
protected function write()
	{
		$ww		= new XML_WDDX_FileWriter( $this->fileName );
		foreach( $this->getConfigValues() as $sectionName => $sectionData )
			foreach( $sectionData as $key => $value)
				$ww->add( $key, $value );
		$ww->write();
	}
1227408
public function write()
	{
		//var_dump($this->map);die();
		$returnstring = '{';
		
		foreach($this->map as $key => $value)
		{
			$returnstring .= '"' . $key . '":';
			
			if($value instanceof JSONObject || $value instanceof JSONArray)
				$returnstring .= $value->write();
			elseif(gettype($value) == 'integer' || gettype($value) == 'double')
				$returnstring .= $value;
			elseif(gettype($value) == 'boolean')
				$returnstring .= (($value) ? 'true' : 'false');
			elseif(gettype($value) == 'NULL')
				$returnstring .= 'null';
			elseif(gettype($value) == 'string')
				$returnstring .= '"' . $value . '"';
			else
				throw new JSONException('Invalid type ' . gettype($value));
			
			if($value !== end($this->map)) $returnstring .= ',';
		}
		
		$returnstring .= '}';
		
		return $returnstring;
	}
377178
protected function write($buffer)
    {
        $socket = $this->getResource();

        while (($length = strlen($buffer)) > 0) {
            $written = @fwrite($socket, $buffer);

            if ($length === $written) {
                return;
            }

            if ($written === false || $written === 0) {
                $this->onConnectionError('Error while writing bytes to the server.');
            }

            $buffer = substr($buffer, $written);
        }
    }
696737
public function write($buffer)
    {
        $buffer = (string) $buffer;
        $bufLen = Binary::safeStrlen($buffer);

        $socket = $this->getSocket();
        $written = 0;

        while ($written < $bufLen) {
            // PHP's fwrite does not behave nice in regards to errors, so we wrap
            // it with a temporary error handler and treat every warning/notice as
            // a error
            $failed = false;
            $errorMessage = "Failed to write to socket";
            set_error_handler(function ($errno, $errstr) use (&$failed, &$errorMessage) {
                $failed = true;
                $errorMessage .= ": $errstr ($errno)";
            });
            $byteCount = fwrite($socket, Binary::safeSubstr($buffer, $written));
            restore_error_handler();

            if ($byteCount === 0 && defined('HHVM_VERSION')) {
                $failed = true;
            }

            if ($failed || $byteCount === false) {
                throw new \RuntimeException($errorMessage);
            }

            $written += $byteCount;
        }


        return $written;
    }
400151
public function write($output)
    {
        //lets parse the file
        if ($this->_hasBeenModified($this->_file) || !file_exists($output)) {
            //get the data
            file_put_contents($output, $this->getData());
            //update the timestamp
            $this->_cache_data['timestamp'] = time();
            file_put_contents($this->_cache_file, serialize($this->_cache_data));
        }
    }
1300148
public function write($data)
    {
        $this->connect();

        $data .= self::EOL;
        $bytesWritten = strlen($data);
        $bytesSent    = fwrite($this->connection, $data, $bytesWritten);

        if ($bytesSent !== $bytesWritten) {
            $this->disconnect();
            throw new Exception\SocketException('Failed to write data.');
        }

        return $this;
    }
1281255
public function writeln($data)
    {
        if (!$this->alive) {
            Daemon::log('Attempt to write to dead IOStream (' . get_class($this) . ')');
            return false;
        }
        if (!isset($this->bevWrite)) {
            return false;
        }
        if (!mb_orig_strlen($data) && !mb_orig_strlen($this->EOL)) {
            return true;
        }
        $this->writing = true;
        $this->bevWrite->write($data);
        $this->bevWrite->write($this->EOL);
        return true;
    }
243105
public function write()
    {
        if ($this->isModified && $this->cacheKey) {
            $this->cache->set($this->cacheKey, $this->queried);
            $this->isModified = false;
        }
    }
1021796
public function write()
    {
        
        $tf = $this->getTranslationFile();
        $buffer = "<?php\n";
        foreach ($tf->getTranslationUnits() as $tu){
            // Prevent empty messages.
            if ($tu->getSource() != '' && $tu->getTarget() != ''){
                $escapes = array("\\", '$', '"', "\n", "\t", "\v", "\r", "\f");
                $replace = array("\\\\", '\\$', '\\"', "\\n", "\\t", "\\v", "\\r", "\\f");
                $source = str_replace($escapes, $replace, $tu->getSource());
                $target = str_replace($escapes, $replace, $tu->getTarget());
                $buffer .= '$GLOBALS[\'__l10n\']["' . $source . '"]="' . $target . '";' . "\n";
            }
        }
        $buffer .= "\n?>";
        
        file_put_contents($this->getFilePath(), $buffer);
        
    }
986129
public function baseWrite()
    {
        set_error_handler(function(){});
        if ($this->transport === 'ssl') {
            $len = fwrite($this->_socket, $this->_sendBuffer, 8192);
        } else {
            $len = fwrite($this->_socket, $this->_sendBuffer);
        }
        restore_error_handler();
        if ($len === strlen($this->_sendBuffer)) {
            $this->bytesWritten += $len;
            Worker::$globalEvent->del($this->_socket, EventInterface::EV_WRITE);
            $this->_sendBuffer = '';
            // Try to emit onBufferDrain callback when the send buffer becomes empty.
            if ($this->onBufferDrain) {
                try {
                    call_user_func($this->onBufferDrain, $this);
                } catch (\Exception $e) {
                    Worker::log($e);
                    exit(250);
                } catch (\Error $e) {
                    Worker::log($e);
                    exit(250);
                }
            }
            if ($this->_status === self::STATUS_CLOSING) {
                $this->destroy();
            }
            return true;
        }
        if ($len > 0) {
            $this->bytesWritten += $len;
            $this->_sendBuffer = substr($this->_sendBuffer, $len);
        } else {
            self::$statistics['send_fail']++;
            $this->destroy();
        }
    }