1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /*
- * Part of Shuzanne - An extensible sequel to an open-source imageboard.
- *
- * @package Shuzanne
- * @author MisleadingName, Shuzanne Contributors
- * @license MPL v2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/.
- */
- namespace app\Interfaces;
- /*
- * Objects that implement this interface can be stored in the database.
- */
- interface IDatabaseObject
- {
- /**
- * Creates the table for the object type in the database.
- */
- public static function CreateTable(): void;
- /**
- * Drops the table for the object type from the database.
- */
- public static function DropTable(): void;
- /**
- * Saves the object to the database.
- */
- public function Save();
- /**
- * Deletes the object from the database.
- */
- public function Delete();
- /**
- * Loads the object from the database.
- */
- public function Load();
- /**
- * Loads multiple objects from the database.
- */
- public function LoadMany();
- }
|