public function __construct($className, $id, $revision) { parent::__construct($className, $id, $revision); $this->message = sprintf("No revision of class '%s' (%s) was found at revision %s or before. The entity did not exist at the specified revision yet.", $className, implode(', ', $id), $revision); }
/** * Return the revision object for a particular revision. * * @param int $rev * @return Revision */ public function findRevision($rev) { $query = "SELECT * FROM " . $this->config->getRevisionTableName() . " r WHERE r.id = ?"; $revisionsData = $this->auditEm->getConnection()->fetchAll($query, array($rev)); if (count($revisionsData) == 1) { return new Revision($revisionsData[0]['id'], \DateTime::createFromFormat($this->platform->getDateTimeFormatString(), $revisionsData[0]['timestamp']), $revisionsData[0]['username']); } else { throw AuditException::invalidRevision($rev); } }
public function __construct($revision) { parent::__construct(null, null, $revision); $this->message = sprintf("No revision '%s' exists.", $revision); }
public function __construct($className) { parent::__construct($className, null, null); $this->message = sprintf("Class '{$className}' is not audited.", $className); }
public function __construct($className, $id, $revision) { parent::__construct($className, $id, $revision); $this->message = sprintf('Class "%s" entity id "%s" has been removed at revision %s', $className, implode(', ', $id), $revision); }