. /** * ActivityPub implementation for GNU social * * @package GNUsocial * * @author Diogo Cordeiro * @copyright 2018-2019 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * * @see http://www.gnu.org/software/social/ */ defined('GNUSOCIAL') || die(); /** * ActivityPub Mention Tag representation * * @category Plugin * @package GNUsocial * * @author Diogo Cordeiro * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class Activitypub_mention_tag { /** * Generates an ActivityPub representation of a Mention Tag * * @author Diogo Cordeiro * * @param string $href Actor Uri * @param string $name Mention name * * @return array pretty array to be used in a response */ public static function mention_tag_to_array_from_values(string $href, string $name): array { $res = [ '@context' => 'https://www.w3.org/ns/activitystreams', 'type' => 'Mention', 'href' => $href, 'name' => $name, ]; return $res; } }