]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/SampleStorageBackend.php
double name
[friendica.git] / tests / Util / SampleStorageBackend.php
index 3f4eb90ada0f91cbddc18426813ad9f4dd75b448..00dad8612c166f34f16752696f5cb57ccf1efc2c 100644 (file)
@@ -1,10 +1,30 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @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 <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Test\Util;
 
+use Friendica\Core\Hook;
 use Friendica\Model\Storage\IStorage;
 
-use Friendica\Core\L10n\L10n;
+use Friendica\Core\L10n;
 
 /**
  * A backend storage example class
@@ -91,4 +111,13 @@ class SampleStorageBackend implements IStorage
        {
                return self::NAME;
        }
+
+       /**
+        * This one is a hack to register this class to the hook
+        */
+       public static function registerHook()
+       {
+               Hook::register('storage_instance', __DIR__ . '/SampleStorageBackendInstance.php', 'create_instance');
+       }
 }
+