public function write($raw, $contentType = null, $stat = array()) { $this->_cdb->addAttach($this->_path, basename($this->_path), $raw, $contentType); if (count($stat) > 0) { $this->_cdb->update($this->_path, $stat); } return $this->_cdb->select($this->_path); }