/** * Updated subtree modification time for all tags in path. * * @throws \RuntimeException * * @param string $pathString * @param int $timestamp */ public function updateSubtreeModificationTime($pathString, $timestamp = null) { try { $this->innerGateway->updateSubtreeModificationTime($pathString, $timestamp); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Updated subtree modification time for tag and all its parents. * * If tag is a synonym, subtree modification time of its main tag is updated * * @param mixed $tagId * @param int $timestamp */ protected function updateSubtreeModificationTime($tagId, $timestamp = null) { if ($tagId > 0) { $tagInfo = $this->loadTagInfo($tagId); $timestamp = $timestamp ?: time(); $this->gateway->updateSubtreeModificationTime($tagInfo->pathString, $timestamp); if ($tagInfo->mainTagId > 0) { $this->gateway->updateSubtreeModificationTime((string) $tagInfo->mainTagId, $timestamp); } } }