| @@ 29-161 (lines=133) @@ | ||
| 26 | ||
| 27 | namespace OCA\Files_FullTextSearch\Model; |
|
| 28 | ||
| 29 | class GroupFolderMount implements \JsonSerializable { |
|
| 30 | ||
| 31 | ||
| 32 | /** @var int */ |
|
| 33 | private $id; |
|
| 34 | ||
| 35 | /** @var string */ |
|
| 36 | private $path; |
|
| 37 | ||
| 38 | /** @var bool */ |
|
| 39 | private $global; |
|
| 40 | ||
| 41 | /** @var array */ |
|
| 42 | private $groups; |
|
| 43 | ||
| 44 | /** @var array */ |
|
| 45 | private $users; |
|
| 46 | ||
| 47 | ||
| 48 | /** |
|
| 49 | * @return int |
|
| 50 | */ |
|
| 51 | public function getId() { |
|
| 52 | return $this->id; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @param int $id |
|
| 57 | * |
|
| 58 | * @return $this |
|
| 59 | */ |
|
| 60 | public function setId($id) { |
|
| 61 | $this->id = $id; |
|
| 62 | ||
| 63 | return $this; |
|
| 64 | } |
|
| 65 | ||
| 66 | ||
| 67 | /** |
|
| 68 | * @return string |
|
| 69 | */ |
|
| 70 | public function getPath() { |
|
| 71 | return $this->path; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @param string $path |
|
| 76 | * |
|
| 77 | * @return $this |
|
| 78 | */ |
|
| 79 | public function setPath($path) { |
|
| 80 | $this->path = $path; |
|
| 81 | ||
| 82 | return $this; |
|
| 83 | } |
|
| 84 | ||
| 85 | ||
| 86 | /** |
|
| 87 | * @return bool |
|
| 88 | */ |
|
| 89 | public function isGlobal() { |
|
| 90 | return $this->global; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * @param bool $global |
|
| 95 | * |
|
| 96 | * @return $this |
|
| 97 | */ |
|
| 98 | public function setGlobal($global) { |
|
| 99 | $this->global = $global; |
|
| 100 | ||
| 101 | return $this; |
|
| 102 | } |
|
| 103 | ||
| 104 | ||
| 105 | /** |
|
| 106 | * @return array |
|
| 107 | */ |
|
| 108 | public function getGroups() { |
|
| 109 | return $this->groups; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * @param array $groups |
|
| 114 | * |
|
| 115 | * @return $this |
|
| 116 | */ |
|
| 117 | public function setGroups($groups) { |
|
| 118 | $this->groups = $groups; |
|
| 119 | ||
| 120 | return $this; |
|
| 121 | } |
|
| 122 | ||
| 123 | ||
| 124 | /** |
|
| 125 | * @return array |
|
| 126 | */ |
|
| 127 | public function getUsers() { |
|
| 128 | return $this->users; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * @param array $users |
|
| 133 | * |
|
| 134 | * @return $this |
|
| 135 | */ |
|
| 136 | public function setUsers($users) { |
|
| 137 | $this->users = $users; |
|
| 138 | ||
| 139 | return $this; |
|
| 140 | } |
|
| 141 | ||
| 142 | ||
| 143 | public function __destruct() { |
|
| 144 | unset($this->id); |
|
| 145 | unset($this->path); |
|
| 146 | unset($this->global); |
|
| 147 | unset($this->groups); |
|
| 148 | unset($this->users); |
|
| 149 | } |
|
| 150 | ||
| 151 | public function jsonSerialize() { |
|
| 152 | return [ |
|
| 153 | 'id' => $this->getId(), |
|
| 154 | 'path' => $this->getPath(), |
|
| 155 | 'global' => $this->isGlobal(), |
|
| 156 | 'groups' => $this->getGroups(), |
|
| 157 | 'users' => $this->getUsers() |
|
| 158 | ]; |
|
| 159 | } |
|
| 160 | ||
| 161 | } |
|
| @@ 29-161 (lines=133) @@ | ||
| 26 | ||
| 27 | namespace OCA\Files_FullTextSearch\Model; |
|
| 28 | ||
| 29 | class MountPoint implements \JsonSerializable { |
|
| 30 | ||
| 31 | ||
| 32 | /** @var int */ |
|
| 33 | private $id; |
|
| 34 | ||
| 35 | /** @var string */ |
|
| 36 | private $path; |
|
| 37 | ||
| 38 | /** @var bool */ |
|
| 39 | private $global; |
|
| 40 | ||
| 41 | /** @var array */ |
|
| 42 | private $groups; |
|
| 43 | ||
| 44 | /** @var array */ |
|
| 45 | private $users; |
|
| 46 | ||
| 47 | ||
| 48 | /** |
|
| 49 | * @return int |
|
| 50 | */ |
|
| 51 | public function getId() { |
|
| 52 | return $this->id; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @param int $id |
|
| 57 | * |
|
| 58 | * @return $this |
|
| 59 | */ |
|
| 60 | public function setId($id) { |
|
| 61 | $this->id = $id; |
|
| 62 | ||
| 63 | return $this; |
|
| 64 | } |
|
| 65 | ||
| 66 | ||
| 67 | /** |
|
| 68 | * @return string |
|
| 69 | */ |
|
| 70 | public function getPath() { |
|
| 71 | return $this->path; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @param string $path |
|
| 76 | * |
|
| 77 | * @return $this |
|
| 78 | */ |
|
| 79 | public function setPath($path) { |
|
| 80 | $this->path = $path; |
|
| 81 | ||
| 82 | return $this; |
|
| 83 | } |
|
| 84 | ||
| 85 | ||
| 86 | /** |
|
| 87 | * @return bool |
|
| 88 | */ |
|
| 89 | public function isGlobal() { |
|
| 90 | return $this->global; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * @param bool $global |
|
| 95 | * |
|
| 96 | * @return $this |
|
| 97 | */ |
|
| 98 | public function setGlobal($global) { |
|
| 99 | $this->global = $global; |
|
| 100 | ||
| 101 | return $this; |
|
| 102 | } |
|
| 103 | ||
| 104 | ||
| 105 | /** |
|
| 106 | * @return array |
|
| 107 | */ |
|
| 108 | public function getGroups() { |
|
| 109 | return $this->groups; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * @param array $groups |
|
| 114 | * |
|
| 115 | * @return $this |
|
| 116 | */ |
|
| 117 | public function setGroups($groups) { |
|
| 118 | $this->groups = $groups; |
|
| 119 | ||
| 120 | return $this; |
|
| 121 | } |
|
| 122 | ||
| 123 | ||
| 124 | /** |
|
| 125 | * @return array |
|
| 126 | */ |
|
| 127 | public function getUsers() { |
|
| 128 | return $this->users; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * @param array $users |
|
| 133 | * |
|
| 134 | * @return $this |
|
| 135 | */ |
|
| 136 | public function setUsers($users) { |
|
| 137 | $this->users = $users; |
|
| 138 | ||
| 139 | return $this; |
|
| 140 | } |
|
| 141 | ||
| 142 | ||
| 143 | public function __destruct() { |
|
| 144 | unset($this->id); |
|
| 145 | unset($this->path); |
|
| 146 | unset($this->global); |
|
| 147 | unset($this->groups); |
|
| 148 | unset($this->users); |
|
| 149 | } |
|
| 150 | ||
| 151 | public function jsonSerialize() { |
|
| 152 | return [ |
|
| 153 | 'id' => $this->getId(), |
|
| 154 | 'path' => $this->getPath(), |
|
| 155 | 'global' => $this->isGlobal(), |
|
| 156 | 'groups' => $this->getGroups(), |
|
| 157 | 'users' => $this->getUsers() |
|
| 158 | ]; |
|
| 159 | } |
|
| 160 | ||
| 161 | } |
|