mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-11-24 05:30:27 +01:00
42 lines
No EOL
893 B
PHP
42 lines
No EOL
893 B
PHP
<?php
|
|
|
|
namespace OCA\OrganizationFolders\Model;
|
|
|
|
use OCA\OrganizationFolders\Interface\TableSerializable;
|
|
|
|
class Organization implements \JsonSerializable, TableSerializable {
|
|
public function __construct(
|
|
private int $id,
|
|
private string $friendlyName,
|
|
private string $membersGroup,
|
|
) {
|
|
}
|
|
|
|
public function getId(): int {
|
|
return $this->id;
|
|
}
|
|
|
|
public function getFriendlyName(): string {
|
|
return $this->friendlyName;
|
|
}
|
|
|
|
public function getMembersGroup(): string {
|
|
return $this->membersGroup;
|
|
}
|
|
|
|
public function jsonSerialize(): array {
|
|
return [
|
|
'id' => $this->id,
|
|
'friendlyName' => $this->friendlyName,
|
|
'membersGroup' => $this->membersGroup,
|
|
];
|
|
}
|
|
|
|
public function tableSerialize(?array $params = null): array {
|
|
return [
|
|
'Id' => $this->id,
|
|
'Friendly Name' => $this->friendlyName,
|
|
'Members Group' => $this->membersGroup,
|
|
];
|
|
}
|
|
} |