Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPassman Bot <info@passman.cc>2016-12-22 05:00:51 +0300
committerPassman Bot <info@passman.cc>2016-12-22 05:00:51 +0300
commitc56682d0bdef2b91f6c9a2d7cc5be50650ef0492 (patch)
treeb9d9f7d44db1b6770a381f5fd35ab2c6d1e03385 /lib/Db/EntityJSONSerializer.php
parent002efc08690f3d57fa18e6203a66b8ffcfd8b7e5 (diff)
Passman 2.0.0-RC1
Don't clean 'bookmarklet.css', 'public-page.css' Signed-off-by: brantje <brantje@gmail.com> Signed-off-by: Passman Bot <info@passman.cc>
Diffstat (limited to 'lib/Db/EntityJSONSerializer.php')
-rw-r--r--lib/Db/EntityJSONSerializer.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Db/EntityJSONSerializer.php b/lib/Db/EntityJSONSerializer.php
new file mode 100644
index 00000000..fc16222d
--- /dev/null
+++ b/lib/Db/EntityJSONSerializer.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Nextcloud - passman
+ *
+ * @copyright Copyright (c) 2016, Sander Brand (brantje@gmail.com)
+ * @copyright Copyright (c) 2016, Marcos Zuriaga Miguel (wolfi@wolfi.es)
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Passman\Db;
+trait EntityJSONSerializer {
+ public function serializeFields($properties) {
+ $result = [];
+ foreach($properties as $property) {
+ $result[$property] = $this->$property;
+ }
+ return $result;
+ }
+} \ No newline at end of file