From 9f2a51b3513c69dcaeeb3f263c889d7698e1450f Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 1 Jun 2024 15:53:34 +0200 Subject: [PATCH] Spaces and remove useless function --- system/libs/pot/OTS_Base_DAO.php | 52 ++++++-------------------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/system/libs/pot/OTS_Base_DAO.php b/system/libs/pot/OTS_Base_DAO.php index 1ab75e6f..48b1ff35 100644 --- a/system/libs/pot/OTS_Base_DAO.php +++ b/system/libs/pot/OTS_Base_DAO.php @@ -15,15 +15,15 @@ /** * Basic data access object routines. - * + * *

* This class defines basic mechanisms for all classes that will represent database accessors. However no coding logic is defined here - only connection handling and PHP core-related stuff to enable variouse operations with objects. *

- * + * *

* This class is mostly usefull when you create own extensions for POT code. *

- * + * * @package POT * @version 0.1.0 */ @@ -31,14 +31,14 @@ abstract class OTS_Base_DAO implements IOTS_DAO { /** * Database connection. - * + * * @var PDO */ protected $db; /** * Sets database connection handler. - * + * * @version 0.1.0 */ public function __construct() @@ -48,11 +48,11 @@ abstract class OTS_Base_DAO implements IOTS_DAO /** * Magic PHP5 method. - * + * *

* Allows object serialisation. *

- * + * * @return array List of properties that should be saved. */ public function __sleep() @@ -62,7 +62,7 @@ abstract class OTS_Base_DAO implements IOTS_DAO /** * Magic PHP5 method. - * + * *

* Allows object unserialisation. *

@@ -74,7 +74,7 @@ abstract class OTS_Base_DAO implements IOTS_DAO /** * Creates clone of object. - * + * *

* Copy of object needs to have different ID. *

@@ -83,38 +83,4 @@ abstract class OTS_Base_DAO implements IOTS_DAO { unset($this->data['id']); } - -/** - * Magic PHP5 method. - * - *

- * Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}. - *

- * - * @version 0.1.0 - * @param array $properties List of object properties. - */ - public static function __set_state($properties) - { - // deletes database handle - if( isset($properties['db']) ) - { - unset($properties['db']); - } - - // initializes new object with current database connection - $object = new self(); - - // loads properties - foreach($properties as $name => $value) - { - $object->$name = $value; - } - - return $object; - } } - -/**#@-*/ - -?>