/** * @see Swift_CharacterStream::write() * * @param string $chars */ public function write($chars) { if (!isset($this->_charReader)) { $this->_charReader = $this->_charReaderFactory->getReaderFor($this->_charset); $this->_map = array(); $this->_mapType = $this->_charReader->getMapType(); } $ignored = ''; $this->_datas .= $chars; $this->_charCount += $this->_charReader->getCharPositions(substr($this->_datas, $this->_datasSize), $this->_datasSize, $this->_map, $ignored); if ($ignored !== false) { $this->_datasSize = strlen($this->_datas) - strlen($ignored); } else { $this->_datasSize = strlen($this->_datas); } }