/** * * @param string $file * @throws DatabaseException */ public function save($file = null) { if (!is_null($file)) { if (is_string($file)) { $this->_path = $file; } else { throw new InvalidArgumentException('Invalid file name'); } } if (is_null($this->_path)) { throw new DatabaseException("No such file path to save anydataset"); } XmlUtil::saveXmlDocument($this->getDomObject(), $this->_path); }