. /** * TheFreeNetwork, "automagic" migration of internal remote profiles * between different federation protocols. * * @package GNUsocial * @author Bruno Casteleiro * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ defined('GNUSOCIAL') || die(); class TheFreeNetworkModule extends Module { const MODULE_VERSION = '0.1.0alpha0'; private $free_network = []; // name of the profile classes of the active federation protocols /** * Called when all plugins have been initialized * We'll populate the $free_network array here * * @return boolean hook value */ public function onInitializePlugin() { Event::handle('StartTFNCensus', [&$this->free_network]); return true; } /** * Plugin version information * * @param array $versions * @return bool hook true */ public function onPluginVersion(array &$versions): bool { $versions[] = [ 'name' => 'TheFreeNetwork', 'version' => self::MODULE_VERSION, 'author' => 'Bruno Casteleiro', 'homepage' => 'https://notabug.org/diogo/gnu-social/src/nightly/plugins/TheFreeNetwork', // TRANS: Module description. 'rawdescription' => '"Automagically" migrate internal remote profiles between different federation protocols' ]; return true; } }