3 namespace Friendica\Util;
5 use Friendica\Model\Group;
8 * Util class for ACL formatting
10 final class ACLFormatter
13 * Turn user/group ACLs stored as angle bracketed text into arrays
15 * @param string $ids A angle-bracketed list of IDs
17 * @return array The array based on the IDs
19 public function expand(string $ids)
21 // turn string array of angle-bracketed elements into numeric array
22 // e.g. "<1><2><3>" => array(1,2,3);
23 preg_match_all('/<(' . Group::FOLLOWERS . '|'. Group::MUTUALS . '|[0-9]+)>/', $ids, $matches, PREG_PATTERN_ORDER);