. * */ namespace Friendica\Object\Api\Friendica; use Friendica\BaseDataTransferObject; /** * Class Group * * */ class Group extends BaseDataTransferObject { /** @var string */ protected $name; /** @var int */ protected $id; /** @var string */ protected $id_str; /** @var array */ protected $user; /** @var string */ protected $mode; /** * Creates an Group entity array * * @param array $group * @param array $user * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public function __construct(array $group, array $user) { $this->name = $group['name']; $this->id = $group['id']; $this->id_str = (string)$group['id']; $this->user = $user; $this->mode = $group['visible'] ? 'public' : 'private'; } }