Add Edit History database objects
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 23 Jun 2014 15:15:15 +0000 (17:15 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Jul 2014 19:51:07 +0000 (21:51 +0200)
wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryEditor.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryList.class.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntry.class.php
new file mode 100644 (file)
index 0000000..d4d59ed
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+namespace wcf\data\edit\history\entry;
+use wcf\data\DatabaseObject;
+
+/**
+ * Represents an edit history entry
+ * 
+ * @author     Tim Duesterhus
+ * @copyright  2001-2014 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf
+ * @subpackage data.edit.history.entry
+ * @category   Community Framework
+ */
+class EditHistoryEntry extends DatabaseObject {
+       /**
+        * @see \wcf\data\DatabaseObject::$databaseTableName
+        */
+       protected static $databaseTableName = 'edit_history_entry';
+       
+       /**
+        * @see \wcf\data\DatabaseObject::$databaseTableIndexName
+        */
+       protected static $databaseTableIndexName = 'entryID';
+       
+       /**
+        * Returns the message text of the history entry.
+        * 
+        * @return      string
+        */
+       public function getMessage() {
+               return $this->message;
+       }
+}
diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryAction.class.php
new file mode 100644 (file)
index 0000000..d6c004e
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+namespace wcf\data\edit\history\entry;
+use wcf\data\AbstractDatabaseObjectAction;
+
+/**
+* Executes edit history entry-related actions.
+* 
+* @author      Tim Duesterhus
+* @copyright   2001-2014 WoltLab GmbH
+* @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+* @package     com.woltlab.wcf
+* @subpackage  data.edit.history.entry
+* @category    Community Framework
+*/
+class EditHistoryEntryAction extends AbstractDatabaseObjectAction {
+       /**
+       * @see  \wcf\data\AbstractDatabaseObjectAction::$className
+       */
+       protected $className = 'wcf\data\edit\history\entry\EditHistoryEntryEditor';
+}
diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryEditor.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryEditor.class.php
new file mode 100644 (file)
index 0000000..6f6d46c
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+namespace wcf\data\edit\history\entry;
+use wcf\data\DatabaseObjectEditor;
+
+/**
+* Extends the edit history entry object with functions to create, update and delete history entries.
+* 
+* @author      Tim Duesterhus
+* @copyright   2001-2014 WoltLab GmbH
+* @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+* @package     com.woltlab.wcf
+* @subpackage  data.edit.history.entry
+* @category    Community Framework
+*/
+class EditHistoryEntryEditor extends DatabaseObjectEditor {
+       /**
+       * @see  \wcf\data\DatabaseObjectEditor::$baseClass
+       */
+       protected static $baseClass = 'wcf\data\edit\history\entry\EditHistoryEntry';
+}
diff --git a/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryList.class.php b/wcfsetup/install/files/lib/data/edit/history/entry/EditHistoryEntryList.class.php
new file mode 100644 (file)
index 0000000..b86e47a
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+namespace wcf\data\edit\history\entry;
+use wcf\data\DatabaseObjectList;
+
+/**
+* Represents a list of edit history entries.
+* 
+* @author      Tim Duesterhus
+* @copyright   2001-2014 WoltLab GmbH
+* @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+* @package     com.woltlab.wcf
+* @subpackage  data.edit.history.entry
+* @category    Community Framework
+*/
+class EditHistoryEntryList extends DatabaseObjectList {
+       /**
+       * @see  \wcf\data\DatabaseObjectList::$className
+       */
+       public $className = 'wcf\data\edit\history\entry\EditHistoryEntry';
+}