/** * * * @param mixed $documentId * @param mixed $xmlVersion * @param mixed $serverDateModified * @param DOMDocument $xmlData * @return void */ public function put($documentId, $xmlVersion, $serverDateModified, DOMDocument $xmlData) { // skip adding cache entry if it is a valid entry already existing if (true === $this->hasValidEntry($documentId, $xmlVersion, $serverDateModified)) { return; } // remove existing cache entry in case of update if (true === $this->hasCacheEntry($documentId, $xmlVersion)) { $this->remove($documentId, $xmlVersion); } $newValue = array('document_id' => $documentId, 'xml_version' => $xmlVersion, 'server_date_modified' => $serverDateModified, 'xml_data' => $xmlData->saveXML()); $this->_table->insert($newValue); $this->_postPut($documentId); }