+ /** @var \Friendica\Repository\PermissionSet */
+ private $permissionSetRepository;
+
+ public function __construct(Database $dba, LoggerInterface $logger, \Friendica\Repository\PermissionSet $permissionSetRepository, array $data = [])
+ {
+ parent::__construct($dba, $logger, $data);
+
+ $this->permissionSetRepository = $permissionSetRepository;
+ }
+
+ public function __get($name)
+ {
+ $this->checkValid();
+
+ switch ($name) {
+ case 'permissionset':
+ $this->permissionset =
+ $this->permissionset ??
+ $this->permissionSetRepository->selectFirst(['id' => $this->psid, 'uid' => $this->uid]);
+
+ $return = $this->permissionset;
+ break;
+ default:
+ $return = parent::__get($name);
+ break;
+ }
+
+ return $return;
+ }