@@ -36,244 +36,244 @@ |
||
| 36 | 36 | |
| 37 | 37 | class Provider implements IProvider { |
| 38 | 38 | |
| 39 | - /** @var IFactory */ |
|
| 40 | - protected $languageFactory; |
|
| 41 | - |
|
| 42 | - /** @var IL10N */ |
|
| 43 | - protected $l; |
|
| 44 | - |
|
| 45 | - /** @var IURLGenerator */ |
|
| 46 | - protected $url; |
|
| 47 | - |
|
| 48 | - /** @var ICommentsManager */ |
|
| 49 | - protected $commentsManager; |
|
| 50 | - |
|
| 51 | - /** @var IUserManager */ |
|
| 52 | - protected $userManager; |
|
| 53 | - |
|
| 54 | - /** @var IManager */ |
|
| 55 | - protected $activityManager; |
|
| 56 | - |
|
| 57 | - /** @var string[] */ |
|
| 58 | - protected $displayNames = []; |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * @param IFactory $languageFactory |
|
| 62 | - * @param IURLGenerator $url |
|
| 63 | - * @param ICommentsManager $commentsManager |
|
| 64 | - * @param IUserManager $userManager |
|
| 65 | - * @param IManager $activityManager |
|
| 66 | - */ |
|
| 67 | - public function __construct(IFactory $languageFactory, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) { |
|
| 68 | - $this->languageFactory = $languageFactory; |
|
| 69 | - $this->url = $url; |
|
| 70 | - $this->commentsManager = $commentsManager; |
|
| 71 | - $this->userManager = $userManager; |
|
| 72 | - $this->activityManager = $activityManager; |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * @param string $language |
|
| 77 | - * @param IEvent $event |
|
| 78 | - * @param IEvent|null $previousEvent |
|
| 79 | - * @return IEvent |
|
| 80 | - * @throws \InvalidArgumentException |
|
| 81 | - * @since 11.0.0 |
|
| 82 | - */ |
|
| 83 | - public function parse($language, IEvent $event, IEvent $previousEvent = null) { |
|
| 84 | - if ($event->getApp() !== 'comments') { |
|
| 85 | - throw new \InvalidArgumentException(); |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - $this->l = $this->languageFactory->get('comments', $language); |
|
| 89 | - |
|
| 90 | - if ($event->getSubject() === 'add_comment_subject') { |
|
| 91 | - $this->parseMessage($event); |
|
| 92 | - if ($this->activityManager->getRequirePNG()) { |
|
| 93 | - $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.png'))); |
|
| 94 | - } else { |
|
| 95 | - $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg'))); |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - if ($this->activityManager->isFormattingFilteredObject()) { |
|
| 99 | - try { |
|
| 100 | - return $this->parseShortVersion($event); |
|
| 101 | - } catch (\InvalidArgumentException $e) { |
|
| 102 | - // Ignore and simply use the long version... |
|
| 103 | - } |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - return $this->parseLongVersion($event); |
|
| 107 | - } else { |
|
| 108 | - throw new \InvalidArgumentException(); |
|
| 109 | - } |
|
| 110 | - } |
|
| 111 | - |
|
| 112 | - /** |
|
| 113 | - * @param IEvent $event |
|
| 114 | - * @return IEvent |
|
| 115 | - * @throws \InvalidArgumentException |
|
| 116 | - */ |
|
| 117 | - protected function parseShortVersion(IEvent $event) { |
|
| 118 | - $subjectParameters = $this->getSubjectParameters($event); |
|
| 119 | - |
|
| 120 | - if ($event->getSubject() === 'add_comment_subject') { |
|
| 121 | - if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { |
|
| 122 | - $event->setParsedSubject($this->l->t('You commented')) |
|
| 123 | - ->setRichSubject($this->l->t('You commented'), []); |
|
| 124 | - } else { |
|
| 125 | - $author = $this->generateUserParameter($subjectParameters['actor']); |
|
| 126 | - $event->setParsedSubject($this->l->t('%1$s commented', [$author['name']])) |
|
| 127 | - ->setRichSubject($this->l->t('{author} commented'), [ |
|
| 128 | - 'author' => $author, |
|
| 129 | - ]); |
|
| 130 | - } |
|
| 131 | - } else { |
|
| 132 | - throw new \InvalidArgumentException(); |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - return $event; |
|
| 136 | - } |
|
| 137 | - |
|
| 138 | - /** |
|
| 139 | - * @param IEvent $event |
|
| 140 | - * @return IEvent |
|
| 141 | - * @throws \InvalidArgumentException |
|
| 142 | - */ |
|
| 143 | - protected function parseLongVersion(IEvent $event) { |
|
| 144 | - $subjectParameters = $this->getSubjectParameters($event); |
|
| 145 | - |
|
| 146 | - if ($event->getSubject() === 'add_comment_subject') { |
|
| 147 | - if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { |
|
| 148 | - $event->setParsedSubject($this->l->t('You commented on %1$s', [ |
|
| 149 | - $subjectParameters['filePath'], |
|
| 150 | - ])) |
|
| 151 | - ->setRichSubject($this->l->t('You commented on {file}'), [ |
|
| 152 | - 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), |
|
| 153 | - ]); |
|
| 154 | - } else { |
|
| 155 | - $author = $this->generateUserParameter($subjectParameters['actor']); |
|
| 156 | - $event->setParsedSubject($this->l->t('%1$s commented on %2$s', [ |
|
| 157 | - $author['name'], |
|
| 158 | - $subjectParameters['filePath'], |
|
| 159 | - ])) |
|
| 160 | - ->setRichSubject($this->l->t('{author} commented on {file}'), [ |
|
| 161 | - 'author' => $author, |
|
| 162 | - 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), |
|
| 163 | - ]); |
|
| 164 | - } |
|
| 165 | - } else { |
|
| 166 | - throw new \InvalidArgumentException(); |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - return $event; |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - protected function getSubjectParameters(IEvent $event) { |
|
| 173 | - $subjectParameters = $event->getSubjectParameters(); |
|
| 174 | - if (isset($subjectParameters['fileId'])) { |
|
| 175 | - return $subjectParameters; |
|
| 176 | - } |
|
| 177 | - |
|
| 178 | - // Fix subjects from 12.0.3 and older |
|
| 179 | - // |
|
| 180 | - // Do NOT Remove unless necessary |
|
| 181 | - // Removing this will break parsing of activities that were created on |
|
| 182 | - // Nextcloud 12, so we should keep this as long as it's acceptable. |
|
| 183 | - // Otherwise if people upgrade over multiple releases in a short period, |
|
| 184 | - // they will get the dead entries in their stream. |
|
| 185 | - return [ |
|
| 186 | - 'actor' => $subjectParameters[0], |
|
| 187 | - 'fileId' => (int) $event->getObjectId(), |
|
| 188 | - 'filePath' => trim($subjectParameters[1], '/'), |
|
| 189 | - ]; |
|
| 190 | - } |
|
| 191 | - |
|
| 192 | - /** |
|
| 193 | - * @param IEvent $event |
|
| 194 | - */ |
|
| 195 | - protected function parseMessage(IEvent $event) { |
|
| 196 | - $messageParameters = $event->getMessageParameters(); |
|
| 197 | - if (empty($messageParameters)) { |
|
| 198 | ||
| 199 | - return; |
|
| 200 | - } |
|
| 201 | - |
|
| 202 | - $commentId = isset($messageParameters['commentId']) ? $messageParameters['commentId'] : $messageParameters[0]; |
|
| 203 | - |
|
| 204 | - try { |
|
| 205 | - $comment = $this->commentsManager->get((string) $commentId); |
|
| 206 | - $message = $comment->getMessage(); |
|
| 207 | - |
|
| 208 | - $mentionCount = 1; |
|
| 209 | - $mentions = []; |
|
| 210 | - foreach ($comment->getMentions() as $mention) { |
|
| 211 | - if ($mention['type'] !== 'user') { |
|
| 212 | - continue; |
|
| 213 | - } |
|
| 214 | - |
|
| 215 | - $pattern = '/(^|\s)(' . '@' . $mention['id'] . ')(\b)/'; |
|
| 216 | - if (strpos($mention['id'], ' ') !== false) { |
|
| 217 | - $pattern = '/(^|\s)(' . '@"' . $mention['id'] . '"' . ')(\b)?/'; |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - $message = preg_replace( |
|
| 221 | - $pattern, |
|
| 222 | - //'${1}' . $this->regexSafeUser($mention['id'], $displayName) . '${3}', |
|
| 223 | - '${1}' . '{mention' . $mentionCount . '}' . '${3}', |
|
| 224 | - $message |
|
| 225 | - ); |
|
| 226 | - $mentions['mention' . $mentionCount] = $this->generateUserParameter($mention['id']); |
|
| 227 | - $mentionCount++; |
|
| 228 | - } |
|
| 229 | - |
|
| 230 | - $event->setParsedMessage($comment->getMessage()) |
|
| 231 | - ->setRichMessage($message, $mentions); |
|
| 232 | - } catch (NotFoundException $e) { |
|
| 233 | - } |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - /** |
|
| 237 | - * @param int $id |
|
| 238 | - * @param string $path |
|
| 239 | - * @return array |
|
| 240 | - */ |
|
| 241 | - protected function generateFileParameter($id, $path) { |
|
| 242 | - return [ |
|
| 243 | - 'type' => 'file', |
|
| 244 | - 'id' => $id, |
|
| 245 | - 'name' => basename($path), |
|
| 246 | - 'path' => $path, |
|
| 247 | - 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), |
|
| 248 | - ]; |
|
| 249 | - } |
|
| 250 | - |
|
| 251 | - /** |
|
| 252 | - * @param string $uid |
|
| 253 | - * @return array |
|
| 254 | - */ |
|
| 255 | - protected function generateUserParameter($uid) { |
|
| 256 | - if (!isset($this->displayNames[$uid])) { |
|
| 257 | - $this->displayNames[$uid] = $this->getDisplayName($uid); |
|
| 258 | - } |
|
| 259 | - |
|
| 260 | - return [ |
|
| 261 | - 'type' => 'user', |
|
| 262 | - 'id' => $uid, |
|
| 263 | - 'name' => $this->displayNames[$uid], |
|
| 264 | - ]; |
|
| 265 | - } |
|
| 266 | - |
|
| 267 | - /** |
|
| 268 | - * @param string $uid |
|
| 269 | - * @return string |
|
| 270 | - */ |
|
| 271 | - protected function getDisplayName($uid) { |
|
| 272 | - $user = $this->userManager->get($uid); |
|
| 273 | - if ($user instanceof IUser) { |
|
| 274 | - return $user->getDisplayName(); |
|
| 275 | - } else { |
|
| 276 | - return $uid; |
|
| 277 | - } |
|
| 278 | - } |
|
| 39 | + /** @var IFactory */ |
|
| 40 | + protected $languageFactory; |
|
| 41 | + |
|
| 42 | + /** @var IL10N */ |
|
| 43 | + protected $l; |
|
| 44 | + |
|
| 45 | + /** @var IURLGenerator */ |
|
| 46 | + protected $url; |
|
| 47 | + |
|
| 48 | + /** @var ICommentsManager */ |
|
| 49 | + protected $commentsManager; |
|
| 50 | + |
|
| 51 | + /** @var IUserManager */ |
|
| 52 | + protected $userManager; |
|
| 53 | + |
|
| 54 | + /** @var IManager */ |
|
| 55 | + protected $activityManager; |
|
| 56 | + |
|
| 57 | + /** @var string[] */ |
|
| 58 | + protected $displayNames = []; |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * @param IFactory $languageFactory |
|
| 62 | + * @param IURLGenerator $url |
|
| 63 | + * @param ICommentsManager $commentsManager |
|
| 64 | + * @param IUserManager $userManager |
|
| 65 | + * @param IManager $activityManager |
|
| 66 | + */ |
|
| 67 | + public function __construct(IFactory $languageFactory, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) { |
|
| 68 | + $this->languageFactory = $languageFactory; |
|
| 69 | + $this->url = $url; |
|
| 70 | + $this->commentsManager = $commentsManager; |
|
| 71 | + $this->userManager = $userManager; |
|
| 72 | + $this->activityManager = $activityManager; |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @param string $language |
|
| 77 | + * @param IEvent $event |
|
| 78 | + * @param IEvent|null $previousEvent |
|
| 79 | + * @return IEvent |
|
| 80 | + * @throws \InvalidArgumentException |
|
| 81 | + * @since 11.0.0 |
|
| 82 | + */ |
|
| 83 | + public function parse($language, IEvent $event, IEvent $previousEvent = null) { |
|
| 84 | + if ($event->getApp() !== 'comments') { |
|
| 85 | + throw new \InvalidArgumentException(); |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + $this->l = $this->languageFactory->get('comments', $language); |
|
| 89 | + |
|
| 90 | + if ($event->getSubject() === 'add_comment_subject') { |
|
| 91 | + $this->parseMessage($event); |
|
| 92 | + if ($this->activityManager->getRequirePNG()) { |
|
| 93 | + $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.png'))); |
|
| 94 | + } else { |
|
| 95 | + $event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg'))); |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + if ($this->activityManager->isFormattingFilteredObject()) { |
|
| 99 | + try { |
|
| 100 | + return $this->parseShortVersion($event); |
|
| 101 | + } catch (\InvalidArgumentException $e) { |
|
| 102 | + // Ignore and simply use the long version... |
|
| 103 | + } |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + return $this->parseLongVersion($event); |
|
| 107 | + } else { |
|
| 108 | + throw new \InvalidArgumentException(); |
|
| 109 | + } |
|
| 110 | + } |
|
| 111 | + |
|
| 112 | + /** |
|
| 113 | + * @param IEvent $event |
|
| 114 | + * @return IEvent |
|
| 115 | + * @throws \InvalidArgumentException |
|
| 116 | + */ |
|
| 117 | + protected function parseShortVersion(IEvent $event) { |
|
| 118 | + $subjectParameters = $this->getSubjectParameters($event); |
|
| 119 | + |
|
| 120 | + if ($event->getSubject() === 'add_comment_subject') { |
|
| 121 | + if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { |
|
| 122 | + $event->setParsedSubject($this->l->t('You commented')) |
|
| 123 | + ->setRichSubject($this->l->t('You commented'), []); |
|
| 124 | + } else { |
|
| 125 | + $author = $this->generateUserParameter($subjectParameters['actor']); |
|
| 126 | + $event->setParsedSubject($this->l->t('%1$s commented', [$author['name']])) |
|
| 127 | + ->setRichSubject($this->l->t('{author} commented'), [ |
|
| 128 | + 'author' => $author, |
|
| 129 | + ]); |
|
| 130 | + } |
|
| 131 | + } else { |
|
| 132 | + throw new \InvalidArgumentException(); |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + return $event; |
|
| 136 | + } |
|
| 137 | + |
|
| 138 | + /** |
|
| 139 | + * @param IEvent $event |
|
| 140 | + * @return IEvent |
|
| 141 | + * @throws \InvalidArgumentException |
|
| 142 | + */ |
|
| 143 | + protected function parseLongVersion(IEvent $event) { |
|
| 144 | + $subjectParameters = $this->getSubjectParameters($event); |
|
| 145 | + |
|
| 146 | + if ($event->getSubject() === 'add_comment_subject') { |
|
| 147 | + if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { |
|
| 148 | + $event->setParsedSubject($this->l->t('You commented on %1$s', [ |
|
| 149 | + $subjectParameters['filePath'], |
|
| 150 | + ])) |
|
| 151 | + ->setRichSubject($this->l->t('You commented on {file}'), [ |
|
| 152 | + 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), |
|
| 153 | + ]); |
|
| 154 | + } else { |
|
| 155 | + $author = $this->generateUserParameter($subjectParameters['actor']); |
|
| 156 | + $event->setParsedSubject($this->l->t('%1$s commented on %2$s', [ |
|
| 157 | + $author['name'], |
|
| 158 | + $subjectParameters['filePath'], |
|
| 159 | + ])) |
|
| 160 | + ->setRichSubject($this->l->t('{author} commented on {file}'), [ |
|
| 161 | + 'author' => $author, |
|
| 162 | + 'file' => $this->generateFileParameter($subjectParameters['fileId'], $subjectParameters['filePath']), |
|
| 163 | + ]); |
|
| 164 | + } |
|
| 165 | + } else { |
|
| 166 | + throw new \InvalidArgumentException(); |
|
| 167 | + } |
|
| 168 | + |
|
| 169 | + return $event; |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + protected function getSubjectParameters(IEvent $event) { |
|
| 173 | + $subjectParameters = $event->getSubjectParameters(); |
|
| 174 | + if (isset($subjectParameters['fileId'])) { |
|
| 175 | + return $subjectParameters; |
|
| 176 | + } |
|
| 177 | + |
|
| 178 | + // Fix subjects from 12.0.3 and older |
|
| 179 | + // |
|
| 180 | + // Do NOT Remove unless necessary |
|
| 181 | + // Removing this will break parsing of activities that were created on |
|
| 182 | + // Nextcloud 12, so we should keep this as long as it's acceptable. |
|
| 183 | + // Otherwise if people upgrade over multiple releases in a short period, |
|
| 184 | + // they will get the dead entries in their stream. |
|
| 185 | + return [ |
|
| 186 | + 'actor' => $subjectParameters[0], |
|
| 187 | + 'fileId' => (int) $event->getObjectId(), |
|
| 188 | + 'filePath' => trim($subjectParameters[1], '/'), |
|
| 189 | + ]; |
|
| 190 | + } |
|
| 191 | + |
|
| 192 | + /** |
|
| 193 | + * @param IEvent $event |
|
| 194 | + */ |
|
| 195 | + protected function parseMessage(IEvent $event) { |
|
| 196 | + $messageParameters = $event->getMessageParameters(); |
|
| 197 | + if (empty($messageParameters)) { |
|
| 198 | ||
| 199 | + return; |
|
| 200 | + } |
|
| 201 | + |
|
| 202 | + $commentId = isset($messageParameters['commentId']) ? $messageParameters['commentId'] : $messageParameters[0]; |
|
| 203 | + |
|
| 204 | + try { |
|
| 205 | + $comment = $this->commentsManager->get((string) $commentId); |
|
| 206 | + $message = $comment->getMessage(); |
|
| 207 | + |
|
| 208 | + $mentionCount = 1; |
|
| 209 | + $mentions = []; |
|
| 210 | + foreach ($comment->getMentions() as $mention) { |
|
| 211 | + if ($mention['type'] !== 'user') { |
|
| 212 | + continue; |
|
| 213 | + } |
|
| 214 | + |
|
| 215 | + $pattern = '/(^|\s)(' . '@' . $mention['id'] . ')(\b)/'; |
|
| 216 | + if (strpos($mention['id'], ' ') !== false) { |
|
| 217 | + $pattern = '/(^|\s)(' . '@"' . $mention['id'] . '"' . ')(\b)?/'; |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + $message = preg_replace( |
|
| 221 | + $pattern, |
|
| 222 | + //'${1}' . $this->regexSafeUser($mention['id'], $displayName) . '${3}', |
|
| 223 | + '${1}' . '{mention' . $mentionCount . '}' . '${3}', |
|
| 224 | + $message |
|
| 225 | + ); |
|
| 226 | + $mentions['mention' . $mentionCount] = $this->generateUserParameter($mention['id']); |
|
| 227 | + $mentionCount++; |
|
| 228 | + } |
|
| 229 | + |
|
| 230 | + $event->setParsedMessage($comment->getMessage()) |
|
| 231 | + ->setRichMessage($message, $mentions); |
|
| 232 | + } catch (NotFoundException $e) { |
|
| 233 | + } |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + /** |
|
| 237 | + * @param int $id |
|
| 238 | + * @param string $path |
|
| 239 | + * @return array |
|
| 240 | + */ |
|
| 241 | + protected function generateFileParameter($id, $path) { |
|
| 242 | + return [ |
|
| 243 | + 'type' => 'file', |
|
| 244 | + 'id' => $id, |
|
| 245 | + 'name' => basename($path), |
|
| 246 | + 'path' => $path, |
|
| 247 | + 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), |
|
| 248 | + ]; |
|
| 249 | + } |
|
| 250 | + |
|
| 251 | + /** |
|
| 252 | + * @param string $uid |
|
| 253 | + * @return array |
|
| 254 | + */ |
|
| 255 | + protected function generateUserParameter($uid) { |
|
| 256 | + if (!isset($this->displayNames[$uid])) { |
|
| 257 | + $this->displayNames[$uid] = $this->getDisplayName($uid); |
|
| 258 | + } |
|
| 259 | + |
|
| 260 | + return [ |
|
| 261 | + 'type' => 'user', |
|
| 262 | + 'id' => $uid, |
|
| 263 | + 'name' => $this->displayNames[$uid], |
|
| 264 | + ]; |
|
| 265 | + } |
|
| 266 | + |
|
| 267 | + /** |
|
| 268 | + * @param string $uid |
|
| 269 | + * @return string |
|
| 270 | + */ |
|
| 271 | + protected function getDisplayName($uid) { |
|
| 272 | + $user = $this->userManager->get($uid); |
|
| 273 | + if ($user instanceof IUser) { |
|
| 274 | + return $user->getDisplayName(); |
|
| 275 | + } else { |
|
| 276 | + return $uid; |
|
| 277 | + } |
|
| 278 | + } |
|
| 279 | 279 | } |
@@ -38,326 +38,326 @@ |
||
| 38 | 38 | * @since 8.2.0 |
| 39 | 39 | */ |
| 40 | 40 | interface IEvent { |
| 41 | - /** |
|
| 42 | - * Set the app of the activity |
|
| 43 | - * |
|
| 44 | - * @param string $app |
|
| 45 | - * @return IEvent |
|
| 46 | - * @throws \InvalidArgumentException if the app id is invalid |
|
| 47 | - * @since 8.2.0 |
|
| 48 | - */ |
|
| 49 | - public function setApp(string $app): self; |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * Set the type of the activity |
|
| 53 | - * |
|
| 54 | - * @param string $type |
|
| 55 | - * @return IEvent |
|
| 56 | - * @throws \InvalidArgumentException if the type is invalid |
|
| 57 | - * @since 8.2.0 |
|
| 58 | - */ |
|
| 59 | - public function setType(string $type): self; |
|
| 60 | - |
|
| 61 | - /** |
|
| 62 | - * Set the affected user of the activity |
|
| 63 | - * |
|
| 64 | - * @param string $user |
|
| 65 | - * @return IEvent |
|
| 66 | - * @throws \InvalidArgumentException if the affected user is invalid |
|
| 67 | - * @since 8.2.0 |
|
| 68 | - */ |
|
| 69 | - public function setAffectedUser(string $user): self; |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * Set the author of the activity |
|
| 73 | - * |
|
| 74 | - * @param string $author |
|
| 75 | - * @return IEvent |
|
| 76 | - * @throws \InvalidArgumentException if the author is invalid |
|
| 77 | - * @since 8.2.0 |
|
| 78 | - */ |
|
| 79 | - public function setAuthor(string $author): self; |
|
| 80 | - |
|
| 81 | - /** |
|
| 82 | - * Set the author of the activity |
|
| 83 | - * |
|
| 84 | - * @param int $timestamp |
|
| 85 | - * @return IEvent |
|
| 86 | - * @throws \InvalidArgumentException if the timestamp is invalid |
|
| 87 | - * @since 8.2.0 |
|
| 88 | - */ |
|
| 89 | - public function setTimestamp(int $timestamp): self; |
|
| 90 | - |
|
| 91 | - /** |
|
| 92 | - * Set the subject of the activity |
|
| 93 | - * |
|
| 94 | - * @param string $subject |
|
| 95 | - * @param array $parameters |
|
| 96 | - * @return IEvent |
|
| 97 | - * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 98 | - * @since 8.2.0 |
|
| 99 | - */ |
|
| 100 | - public function setSubject(string $subject, array $parameters = []): self; |
|
| 101 | - |
|
| 102 | - /** |
|
| 103 | - * Set a parsed subject |
|
| 104 | - * |
|
| 105 | - * HTML is not allowed in the parsed subject and will be escaped |
|
| 106 | - * automatically by the clients. You can use the RichObjectString system |
|
| 107 | - * provided by the Nextcloud server to highlight important parameters via |
|
| 108 | - * the setRichSubject method, but make sure, that a plain text message is |
|
| 109 | - * always set via setParsedSubject, to support clients which can not handle |
|
| 110 | - * rich strings. |
|
| 111 | - * |
|
| 112 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 113 | - * |
|
| 114 | - * @param string $subject |
|
| 115 | - * @return $this |
|
| 116 | - * @throws \InvalidArgumentException if the subject is invalid |
|
| 117 | - * @since 11.0.0 |
|
| 118 | - */ |
|
| 119 | - public function setParsedSubject(string $subject): self; |
|
| 120 | - |
|
| 121 | - /** |
|
| 122 | - * @return string |
|
| 123 | - * @since 11.0.0 |
|
| 124 | - */ |
|
| 125 | - public function getParsedSubject(): string; |
|
| 126 | - |
|
| 127 | - /** |
|
| 128 | - * Set a RichObjectString subject |
|
| 129 | - * |
|
| 130 | - * HTML is not allowed in the rich subject and will be escaped automatically |
|
| 131 | - * by the clients, but you can use the RichObjectString system provided by |
|
| 132 | - * the Nextcloud server to highlight important parameters. |
|
| 133 | - * Also make sure, that a plain text subject is always set via |
|
| 134 | - * setParsedSubject, to support clients which can not handle rich strings. |
|
| 135 | - * |
|
| 136 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 137 | - * |
|
| 138 | - * @param string $subject |
|
| 139 | - * @param array $parameters |
|
| 140 | - * @return $this |
|
| 141 | - * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 142 | - * @since 11.0.0 |
|
| 143 | - */ |
|
| 144 | - public function setRichSubject(string $subject, array $parameters = []): self; |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * @return string |
|
| 148 | - * @since 11.0.0 |
|
| 149 | - */ |
|
| 150 | - public function getRichSubject(): string; |
|
| 151 | - |
|
| 152 | - /** |
|
| 153 | - * @return array[] |
|
| 154 | - * @since 11.0.0 |
|
| 155 | - */ |
|
| 156 | - public function getRichSubjectParameters(): array; |
|
| 157 | - |
|
| 158 | - /** |
|
| 159 | - * Set the message of the activity |
|
| 160 | - * |
|
| 161 | - * @param string $message |
|
| 162 | - * @param array $parameters |
|
| 163 | - * @return IEvent |
|
| 164 | - * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 165 | - * @since 8.2.0 |
|
| 166 | - */ |
|
| 167 | - public function setMessage(string $message, array $parameters = []): self; |
|
| 168 | - |
|
| 169 | - /** |
|
| 170 | - * Set a parsed message |
|
| 171 | - * |
|
| 172 | - * HTML is not allowed in the parsed message and will be escaped |
|
| 173 | - * automatically by the clients. You can use the RichObjectString system |
|
| 174 | - * provided by the Nextcloud server to highlight important parameters via |
|
| 175 | - * the setRichMessage method, but make sure, that a plain text message is |
|
| 176 | - * always set via setParsedMessage, to support clients which can not handle |
|
| 177 | - * rich strings. |
|
| 178 | - * |
|
| 179 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 180 | - * |
|
| 181 | - * @param string $message |
|
| 182 | - * @return $this |
|
| 183 | - * @throws \InvalidArgumentException if the message is invalid |
|
| 184 | - * @since 11.0.0 |
|
| 185 | - */ |
|
| 186 | - public function setParsedMessage(string $message): self; |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * @return string |
|
| 190 | - * @since 11.0.0 |
|
| 191 | - */ |
|
| 192 | - public function getParsedMessage(): string; |
|
| 193 | - |
|
| 194 | - /** |
|
| 195 | - * Set a RichObjectString message |
|
| 196 | - * |
|
| 197 | - * HTML is not allowed in the rich message and will be escaped automatically |
|
| 198 | - * by the clients, but you can use the RichObjectString system provided by |
|
| 199 | - * the Nextcloud server to highlight important parameters. |
|
| 200 | - * Also make sure, that a plain text message is always set via |
|
| 201 | - * setParsedMessage, to support clients which can not handle rich strings. |
|
| 202 | - * |
|
| 203 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 204 | - * |
|
| 205 | - * @param string $message |
|
| 206 | - * @param array $parameters |
|
| 207 | - * @return $this |
|
| 208 | - * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 209 | - * @since 11.0.0 |
|
| 210 | - */ |
|
| 211 | - public function setRichMessage(string $message, array $parameters = []): self; |
|
| 212 | - |
|
| 213 | - /** |
|
| 214 | - * @return string |
|
| 215 | - * @since 11.0.0 |
|
| 216 | - */ |
|
| 217 | - public function getRichMessage(): string; |
|
| 218 | - |
|
| 219 | - /** |
|
| 220 | - * @return array[] |
|
| 221 | - * @since 11.0.0 |
|
| 222 | - */ |
|
| 223 | - public function getRichMessageParameters(): array; |
|
| 224 | - |
|
| 225 | - /** |
|
| 226 | - * Set the object of the activity |
|
| 227 | - * |
|
| 228 | - * @param string $objectType |
|
| 229 | - * @param int $objectId |
|
| 230 | - * @param string $objectName |
|
| 231 | - * @return IEvent |
|
| 232 | - * @throws \InvalidArgumentException if the object is invalid |
|
| 233 | - * @since 8.2.0 |
|
| 234 | - */ |
|
| 235 | - public function setObject(string $objectType, int $objectId, string $objectName = ''): self; |
|
| 236 | - |
|
| 237 | - /** |
|
| 238 | - * Set the link of the activity |
|
| 239 | - * |
|
| 240 | - * @param string $link |
|
| 241 | - * @return IEvent |
|
| 242 | - * @throws \InvalidArgumentException if the link is invalid |
|
| 243 | - * @since 8.2.0 |
|
| 244 | - */ |
|
| 245 | - public function setLink(string $link): self; |
|
| 246 | - |
|
| 247 | - /** |
|
| 248 | - * @return string |
|
| 249 | - * @since 8.2.0 |
|
| 250 | - */ |
|
| 251 | - public function getApp(): string; |
|
| 252 | - |
|
| 253 | - /** |
|
| 254 | - * @return string |
|
| 255 | - * @since 8.2.0 |
|
| 256 | - */ |
|
| 257 | - public function getType(): string; |
|
| 258 | - |
|
| 259 | - /** |
|
| 260 | - * @return string |
|
| 261 | - * @since 8.2.0 |
|
| 262 | - */ |
|
| 263 | - public function getAffectedUser(): string; |
|
| 264 | - |
|
| 265 | - /** |
|
| 266 | - * @return string |
|
| 267 | - * @since 8.2.0 |
|
| 268 | - */ |
|
| 269 | - public function getAuthor(): string; |
|
| 270 | - |
|
| 271 | - /** |
|
| 272 | - * @return int |
|
| 273 | - * @since 8.2.0 |
|
| 274 | - */ |
|
| 275 | - public function getTimestamp(): int; |
|
| 276 | - |
|
| 277 | - /** |
|
| 278 | - * @return string |
|
| 279 | - * @since 8.2.0 |
|
| 280 | - */ |
|
| 281 | - public function getSubject(): string; |
|
| 282 | - |
|
| 283 | - /** |
|
| 284 | - * @return array |
|
| 285 | - * @since 8.2.0 |
|
| 286 | - */ |
|
| 287 | - public function getSubjectParameters(): array; |
|
| 288 | - |
|
| 289 | - /** |
|
| 290 | - * @return string |
|
| 291 | - * @since 8.2.0 |
|
| 292 | - */ |
|
| 293 | - public function getMessage(): string; |
|
| 294 | - |
|
| 295 | - /** |
|
| 296 | - * @return array |
|
| 297 | - * @since 8.2.0 |
|
| 298 | - */ |
|
| 299 | - public function getMessageParameters(): array; |
|
| 300 | - |
|
| 301 | - /** |
|
| 302 | - * @return string |
|
| 303 | - * @since 8.2.0 |
|
| 304 | - */ |
|
| 305 | - public function getObjectType(): string; |
|
| 306 | - |
|
| 307 | - /** |
|
| 308 | - * @return int |
|
| 309 | - * @since 8.2.0 |
|
| 310 | - */ |
|
| 311 | - public function getObjectId(): int; |
|
| 312 | - |
|
| 313 | - /** |
|
| 314 | - * @return string |
|
| 315 | - * @since 8.2.0 |
|
| 316 | - */ |
|
| 317 | - public function getObjectName(): string; |
|
| 318 | - |
|
| 319 | - /** |
|
| 320 | - * @return string |
|
| 321 | - * @since 8.2.0 |
|
| 322 | - */ |
|
| 323 | - public function getLink(): string; |
|
| 324 | - |
|
| 325 | - /** |
|
| 326 | - * @param string $icon |
|
| 327 | - * @return $this |
|
| 328 | - * @throws \InvalidArgumentException if the icon is invalid |
|
| 329 | - * @since 11.0.0 |
|
| 330 | - */ |
|
| 331 | - public function setIcon(string $icon): self; |
|
| 332 | - |
|
| 333 | - /** |
|
| 334 | - * @return string |
|
| 335 | - * @since 11.0.0 |
|
| 336 | - */ |
|
| 337 | - public function getIcon(): string; |
|
| 338 | - |
|
| 339 | - /** |
|
| 340 | - * @param IEvent $child |
|
| 341 | - * @return $this |
|
| 342 | - * @since 11.0.0 - Since 15.0.0 returns $this |
|
| 343 | - */ |
|
| 344 | - public function setChildEvent(IEvent $child): self; |
|
| 345 | - |
|
| 346 | - /** |
|
| 347 | - * @return IEvent|null |
|
| 348 | - * @since 11.0.0 |
|
| 349 | - */ |
|
| 350 | - public function getChildEvent(); |
|
| 351 | - |
|
| 352 | - /** |
|
| 353 | - * @return bool |
|
| 354 | - * @since 11.0.0 |
|
| 355 | - */ |
|
| 356 | - public function isValid(): bool; |
|
| 357 | - |
|
| 358 | - /** |
|
| 359 | - * @return bool |
|
| 360 | - * @since 11.0.0 |
|
| 361 | - */ |
|
| 362 | - public function isValidParsed(): bool; |
|
| 41 | + /** |
|
| 42 | + * Set the app of the activity |
|
| 43 | + * |
|
| 44 | + * @param string $app |
|
| 45 | + * @return IEvent |
|
| 46 | + * @throws \InvalidArgumentException if the app id is invalid |
|
| 47 | + * @since 8.2.0 |
|
| 48 | + */ |
|
| 49 | + public function setApp(string $app): self; |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * Set the type of the activity |
|
| 53 | + * |
|
| 54 | + * @param string $type |
|
| 55 | + * @return IEvent |
|
| 56 | + * @throws \InvalidArgumentException if the type is invalid |
|
| 57 | + * @since 8.2.0 |
|
| 58 | + */ |
|
| 59 | + public function setType(string $type): self; |
|
| 60 | + |
|
| 61 | + /** |
|
| 62 | + * Set the affected user of the activity |
|
| 63 | + * |
|
| 64 | + * @param string $user |
|
| 65 | + * @return IEvent |
|
| 66 | + * @throws \InvalidArgumentException if the affected user is invalid |
|
| 67 | + * @since 8.2.0 |
|
| 68 | + */ |
|
| 69 | + public function setAffectedUser(string $user): self; |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * Set the author of the activity |
|
| 73 | + * |
|
| 74 | + * @param string $author |
|
| 75 | + * @return IEvent |
|
| 76 | + * @throws \InvalidArgumentException if the author is invalid |
|
| 77 | + * @since 8.2.0 |
|
| 78 | + */ |
|
| 79 | + public function setAuthor(string $author): self; |
|
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * Set the author of the activity |
|
| 83 | + * |
|
| 84 | + * @param int $timestamp |
|
| 85 | + * @return IEvent |
|
| 86 | + * @throws \InvalidArgumentException if the timestamp is invalid |
|
| 87 | + * @since 8.2.0 |
|
| 88 | + */ |
|
| 89 | + public function setTimestamp(int $timestamp): self; |
|
| 90 | + |
|
| 91 | + /** |
|
| 92 | + * Set the subject of the activity |
|
| 93 | + * |
|
| 94 | + * @param string $subject |
|
| 95 | + * @param array $parameters |
|
| 96 | + * @return IEvent |
|
| 97 | + * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 98 | + * @since 8.2.0 |
|
| 99 | + */ |
|
| 100 | + public function setSubject(string $subject, array $parameters = []): self; |
|
| 101 | + |
|
| 102 | + /** |
|
| 103 | + * Set a parsed subject |
|
| 104 | + * |
|
| 105 | + * HTML is not allowed in the parsed subject and will be escaped |
|
| 106 | + * automatically by the clients. You can use the RichObjectString system |
|
| 107 | + * provided by the Nextcloud server to highlight important parameters via |
|
| 108 | + * the setRichSubject method, but make sure, that a plain text message is |
|
| 109 | + * always set via setParsedSubject, to support clients which can not handle |
|
| 110 | + * rich strings. |
|
| 111 | + * |
|
| 112 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 113 | + * |
|
| 114 | + * @param string $subject |
|
| 115 | + * @return $this |
|
| 116 | + * @throws \InvalidArgumentException if the subject is invalid |
|
| 117 | + * @since 11.0.0 |
|
| 118 | + */ |
|
| 119 | + public function setParsedSubject(string $subject): self; |
|
| 120 | + |
|
| 121 | + /** |
|
| 122 | + * @return string |
|
| 123 | + * @since 11.0.0 |
|
| 124 | + */ |
|
| 125 | + public function getParsedSubject(): string; |
|
| 126 | + |
|
| 127 | + /** |
|
| 128 | + * Set a RichObjectString subject |
|
| 129 | + * |
|
| 130 | + * HTML is not allowed in the rich subject and will be escaped automatically |
|
| 131 | + * by the clients, but you can use the RichObjectString system provided by |
|
| 132 | + * the Nextcloud server to highlight important parameters. |
|
| 133 | + * Also make sure, that a plain text subject is always set via |
|
| 134 | + * setParsedSubject, to support clients which can not handle rich strings. |
|
| 135 | + * |
|
| 136 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 137 | + * |
|
| 138 | + * @param string $subject |
|
| 139 | + * @param array $parameters |
|
| 140 | + * @return $this |
|
| 141 | + * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 142 | + * @since 11.0.0 |
|
| 143 | + */ |
|
| 144 | + public function setRichSubject(string $subject, array $parameters = []): self; |
|
| 145 | + |
|
| 146 | + /** |
|
| 147 | + * @return string |
|
| 148 | + * @since 11.0.0 |
|
| 149 | + */ |
|
| 150 | + public function getRichSubject(): string; |
|
| 151 | + |
|
| 152 | + /** |
|
| 153 | + * @return array[] |
|
| 154 | + * @since 11.0.0 |
|
| 155 | + */ |
|
| 156 | + public function getRichSubjectParameters(): array; |
|
| 157 | + |
|
| 158 | + /** |
|
| 159 | + * Set the message of the activity |
|
| 160 | + * |
|
| 161 | + * @param string $message |
|
| 162 | + * @param array $parameters |
|
| 163 | + * @return IEvent |
|
| 164 | + * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 165 | + * @since 8.2.0 |
|
| 166 | + */ |
|
| 167 | + public function setMessage(string $message, array $parameters = []): self; |
|
| 168 | + |
|
| 169 | + /** |
|
| 170 | + * Set a parsed message |
|
| 171 | + * |
|
| 172 | + * HTML is not allowed in the parsed message and will be escaped |
|
| 173 | + * automatically by the clients. You can use the RichObjectString system |
|
| 174 | + * provided by the Nextcloud server to highlight important parameters via |
|
| 175 | + * the setRichMessage method, but make sure, that a plain text message is |
|
| 176 | + * always set via setParsedMessage, to support clients which can not handle |
|
| 177 | + * rich strings. |
|
| 178 | + * |
|
| 179 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 180 | + * |
|
| 181 | + * @param string $message |
|
| 182 | + * @return $this |
|
| 183 | + * @throws \InvalidArgumentException if the message is invalid |
|
| 184 | + * @since 11.0.0 |
|
| 185 | + */ |
|
| 186 | + public function setParsedMessage(string $message): self; |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * @return string |
|
| 190 | + * @since 11.0.0 |
|
| 191 | + */ |
|
| 192 | + public function getParsedMessage(): string; |
|
| 193 | + |
|
| 194 | + /** |
|
| 195 | + * Set a RichObjectString message |
|
| 196 | + * |
|
| 197 | + * HTML is not allowed in the rich message and will be escaped automatically |
|
| 198 | + * by the clients, but you can use the RichObjectString system provided by |
|
| 199 | + * the Nextcloud server to highlight important parameters. |
|
| 200 | + * Also make sure, that a plain text message is always set via |
|
| 201 | + * setParsedMessage, to support clients which can not handle rich strings. |
|
| 202 | + * |
|
| 203 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 204 | + * |
|
| 205 | + * @param string $message |
|
| 206 | + * @param array $parameters |
|
| 207 | + * @return $this |
|
| 208 | + * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 209 | + * @since 11.0.0 |
|
| 210 | + */ |
|
| 211 | + public function setRichMessage(string $message, array $parameters = []): self; |
|
| 212 | + |
|
| 213 | + /** |
|
| 214 | + * @return string |
|
| 215 | + * @since 11.0.0 |
|
| 216 | + */ |
|
| 217 | + public function getRichMessage(): string; |
|
| 218 | + |
|
| 219 | + /** |
|
| 220 | + * @return array[] |
|
| 221 | + * @since 11.0.0 |
|
| 222 | + */ |
|
| 223 | + public function getRichMessageParameters(): array; |
|
| 224 | + |
|
| 225 | + /** |
|
| 226 | + * Set the object of the activity |
|
| 227 | + * |
|
| 228 | + * @param string $objectType |
|
| 229 | + * @param int $objectId |
|
| 230 | + * @param string $objectName |
|
| 231 | + * @return IEvent |
|
| 232 | + * @throws \InvalidArgumentException if the object is invalid |
|
| 233 | + * @since 8.2.0 |
|
| 234 | + */ |
|
| 235 | + public function setObject(string $objectType, int $objectId, string $objectName = ''): self; |
|
| 236 | + |
|
| 237 | + /** |
|
| 238 | + * Set the link of the activity |
|
| 239 | + * |
|
| 240 | + * @param string $link |
|
| 241 | + * @return IEvent |
|
| 242 | + * @throws \InvalidArgumentException if the link is invalid |
|
| 243 | + * @since 8.2.0 |
|
| 244 | + */ |
|
| 245 | + public function setLink(string $link): self; |
|
| 246 | + |
|
| 247 | + /** |
|
| 248 | + * @return string |
|
| 249 | + * @since 8.2.0 |
|
| 250 | + */ |
|
| 251 | + public function getApp(): string; |
|
| 252 | + |
|
| 253 | + /** |
|
| 254 | + * @return string |
|
| 255 | + * @since 8.2.0 |
|
| 256 | + */ |
|
| 257 | + public function getType(): string; |
|
| 258 | + |
|
| 259 | + /** |
|
| 260 | + * @return string |
|
| 261 | + * @since 8.2.0 |
|
| 262 | + */ |
|
| 263 | + public function getAffectedUser(): string; |
|
| 264 | + |
|
| 265 | + /** |
|
| 266 | + * @return string |
|
| 267 | + * @since 8.2.0 |
|
| 268 | + */ |
|
| 269 | + public function getAuthor(): string; |
|
| 270 | + |
|
| 271 | + /** |
|
| 272 | + * @return int |
|
| 273 | + * @since 8.2.0 |
|
| 274 | + */ |
|
| 275 | + public function getTimestamp(): int; |
|
| 276 | + |
|
| 277 | + /** |
|
| 278 | + * @return string |
|
| 279 | + * @since 8.2.0 |
|
| 280 | + */ |
|
| 281 | + public function getSubject(): string; |
|
| 282 | + |
|
| 283 | + /** |
|
| 284 | + * @return array |
|
| 285 | + * @since 8.2.0 |
|
| 286 | + */ |
|
| 287 | + public function getSubjectParameters(): array; |
|
| 288 | + |
|
| 289 | + /** |
|
| 290 | + * @return string |
|
| 291 | + * @since 8.2.0 |
|
| 292 | + */ |
|
| 293 | + public function getMessage(): string; |
|
| 294 | + |
|
| 295 | + /** |
|
| 296 | + * @return array |
|
| 297 | + * @since 8.2.0 |
|
| 298 | + */ |
|
| 299 | + public function getMessageParameters(): array; |
|
| 300 | + |
|
| 301 | + /** |
|
| 302 | + * @return string |
|
| 303 | + * @since 8.2.0 |
|
| 304 | + */ |
|
| 305 | + public function getObjectType(): string; |
|
| 306 | + |
|
| 307 | + /** |
|
| 308 | + * @return int |
|
| 309 | + * @since 8.2.0 |
|
| 310 | + */ |
|
| 311 | + public function getObjectId(): int; |
|
| 312 | + |
|
| 313 | + /** |
|
| 314 | + * @return string |
|
| 315 | + * @since 8.2.0 |
|
| 316 | + */ |
|
| 317 | + public function getObjectName(): string; |
|
| 318 | + |
|
| 319 | + /** |
|
| 320 | + * @return string |
|
| 321 | + * @since 8.2.0 |
|
| 322 | + */ |
|
| 323 | + public function getLink(): string; |
|
| 324 | + |
|
| 325 | + /** |
|
| 326 | + * @param string $icon |
|
| 327 | + * @return $this |
|
| 328 | + * @throws \InvalidArgumentException if the icon is invalid |
|
| 329 | + * @since 11.0.0 |
|
| 330 | + */ |
|
| 331 | + public function setIcon(string $icon): self; |
|
| 332 | + |
|
| 333 | + /** |
|
| 334 | + * @return string |
|
| 335 | + * @since 11.0.0 |
|
| 336 | + */ |
|
| 337 | + public function getIcon(): string; |
|
| 338 | + |
|
| 339 | + /** |
|
| 340 | + * @param IEvent $child |
|
| 341 | + * @return $this |
|
| 342 | + * @since 11.0.0 - Since 15.0.0 returns $this |
|
| 343 | + */ |
|
| 344 | + public function setChildEvent(IEvent $child): self; |
|
| 345 | + |
|
| 346 | + /** |
|
| 347 | + * @return IEvent|null |
|
| 348 | + * @since 11.0.0 |
|
| 349 | + */ |
|
| 350 | + public function getChildEvent(); |
|
| 351 | + |
|
| 352 | + /** |
|
| 353 | + * @return bool |
|
| 354 | + * @since 11.0.0 |
|
| 355 | + */ |
|
| 356 | + public function isValid(): bool; |
|
| 357 | + |
|
| 358 | + /** |
|
| 359 | + * @return bool |
|
| 360 | + * @since 11.0.0 |
|
| 361 | + */ |
|
| 362 | + public function isValidParsed(): bool; |
|
| 363 | 363 | } |
@@ -30,294 +30,294 @@ |
||
| 30 | 30 | * @since 9.0.0 |
| 31 | 31 | */ |
| 32 | 32 | interface INotification { |
| 33 | - /** |
|
| 34 | - * @param string $app |
|
| 35 | - * @return $this |
|
| 36 | - * @throws \InvalidArgumentException if the app id is invalid |
|
| 37 | - * @since 9.0.0 |
|
| 38 | - */ |
|
| 39 | - public function setApp($app); |
|
| 40 | - |
|
| 41 | - /** |
|
| 42 | - * @return string |
|
| 43 | - * @since 9.0.0 |
|
| 44 | - */ |
|
| 45 | - public function getApp(); |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * @param string $user |
|
| 49 | - * @return $this |
|
| 50 | - * @throws \InvalidArgumentException if the user id is invalid |
|
| 51 | - * @since 9.0.0 |
|
| 52 | - */ |
|
| 53 | - public function setUser($user); |
|
| 54 | - |
|
| 55 | - /** |
|
| 56 | - * @return string |
|
| 57 | - * @since 9.0.0 |
|
| 58 | - */ |
|
| 59 | - public function getUser(); |
|
| 60 | - |
|
| 61 | - /** |
|
| 62 | - * @param \DateTime $dateTime |
|
| 63 | - * @return $this |
|
| 64 | - * @throws \InvalidArgumentException if the $dateTime is invalid |
|
| 65 | - * @since 9.0.0 |
|
| 66 | - */ |
|
| 67 | - public function setDateTime(\DateTime $dateTime); |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * @return \DateTime |
|
| 71 | - * @since 9.0.0 |
|
| 72 | - */ |
|
| 73 | - public function getDateTime(); |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * @param string $type |
|
| 77 | - * @param string $id |
|
| 78 | - * @return $this |
|
| 79 | - * @throws \InvalidArgumentException if the object type or id is invalid |
|
| 80 | - * @since 9.0.0 |
|
| 81 | - */ |
|
| 82 | - public function setObject($type, $id); |
|
| 83 | - |
|
| 84 | - /** |
|
| 85 | - * @return string |
|
| 86 | - * @since 9.0.0 |
|
| 87 | - */ |
|
| 88 | - public function getObjectType(); |
|
| 89 | - |
|
| 90 | - /** |
|
| 91 | - * @return string |
|
| 92 | - * @since 9.0.0 |
|
| 93 | - */ |
|
| 94 | - public function getObjectId(); |
|
| 95 | - |
|
| 96 | - /** |
|
| 97 | - * @param string $subject |
|
| 98 | - * @param array $parameters |
|
| 99 | - * @return $this |
|
| 100 | - * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 101 | - * @since 9.0.0 |
|
| 102 | - */ |
|
| 103 | - public function setSubject($subject, array $parameters = []); |
|
| 104 | - |
|
| 105 | - /** |
|
| 106 | - * @return string |
|
| 107 | - * @since 9.0.0 |
|
| 108 | - */ |
|
| 109 | - public function getSubject(); |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * @return string[] |
|
| 113 | - * @since 9.0.0 |
|
| 114 | - */ |
|
| 115 | - public function getSubjectParameters(); |
|
| 116 | - |
|
| 117 | - /** |
|
| 118 | - * Set a parsed subject |
|
| 119 | - * |
|
| 120 | - * HTML is not allowed in the parsed subject and will be escaped |
|
| 121 | - * automatically by the clients. You can use the RichObjectString system |
|
| 122 | - * provided by the Nextcloud server to highlight important parameters via |
|
| 123 | - * the setRichSubject method, but make sure, that a plain text message is |
|
| 124 | - * always set via setParsedSubject, to support clients which can not handle |
|
| 125 | - * rich strings. |
|
| 126 | - * |
|
| 127 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 128 | - * |
|
| 129 | - * @param string $subject |
|
| 130 | - * @return $this |
|
| 131 | - * @throws \InvalidArgumentException if the subject is invalid |
|
| 132 | - * @since 9.0.0 |
|
| 133 | - */ |
|
| 134 | - public function setParsedSubject($subject); |
|
| 135 | - |
|
| 136 | - /** |
|
| 137 | - * @return string |
|
| 138 | - * @since 9.0.0 |
|
| 139 | - */ |
|
| 140 | - public function getParsedSubject(); |
|
| 141 | - |
|
| 142 | - /** |
|
| 143 | - * Set a RichObjectString subject |
|
| 144 | - * |
|
| 145 | - * HTML is not allowed in the rich subject and will be escaped automatically |
|
| 146 | - * by the clients, but you can use the RichObjectString system provided by |
|
| 147 | - * the Nextcloud server to highlight important parameters. |
|
| 148 | - * Also make sure, that a plain text subject is always set via |
|
| 149 | - * setParsedSubject, to support clients which can not handle rich strings. |
|
| 150 | - * |
|
| 151 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 152 | - * |
|
| 153 | - * @param string $subject |
|
| 154 | - * @param array $parameters |
|
| 155 | - * @return $this |
|
| 156 | - * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 157 | - * @since 11.0.0 |
|
| 158 | - */ |
|
| 159 | - public function setRichSubject($subject, array $parameters = []); |
|
| 160 | - |
|
| 161 | - /** |
|
| 162 | - * @return string |
|
| 163 | - * @since 11.0.0 |
|
| 164 | - */ |
|
| 165 | - public function getRichSubject(); |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * @return array[] |
|
| 169 | - * @since 11.0.0 |
|
| 170 | - */ |
|
| 171 | - public function getRichSubjectParameters(); |
|
| 172 | - |
|
| 173 | - /** |
|
| 174 | - * @param string $message |
|
| 175 | - * @param array $parameters |
|
| 176 | - * @return $this |
|
| 177 | - * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 178 | - * @since 9.0.0 |
|
| 179 | - */ |
|
| 180 | - public function setMessage($message, array $parameters = []); |
|
| 181 | - |
|
| 182 | - /** |
|
| 183 | - * @return string |
|
| 184 | - * @since 9.0.0 |
|
| 185 | - */ |
|
| 186 | - public function getMessage(); |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * @return string[] |
|
| 190 | - * @since 9.0.0 |
|
| 191 | - */ |
|
| 192 | - public function getMessageParameters(); |
|
| 193 | - |
|
| 194 | - /** |
|
| 195 | - * Set a parsed message |
|
| 196 | - * |
|
| 197 | - * HTML is not allowed in the parsed message and will be escaped |
|
| 198 | - * automatically by the clients. You can use the RichObjectString system |
|
| 199 | - * provided by the Nextcloud server to highlight important parameters via |
|
| 200 | - * the setRichMessage method, but make sure, that a plain text message is |
|
| 201 | - * always set via setParsedMessage, to support clients which can not handle |
|
| 202 | - * rich strings. |
|
| 203 | - * |
|
| 204 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 205 | - * |
|
| 206 | - * @param string $message |
|
| 207 | - * @return $this |
|
| 208 | - * @throws \InvalidArgumentException if the message is invalid |
|
| 209 | - * @since 9.0.0 |
|
| 210 | - */ |
|
| 211 | - public function setParsedMessage($message); |
|
| 212 | - |
|
| 213 | - /** |
|
| 214 | - * @return string |
|
| 215 | - * @since 9.0.0 |
|
| 216 | - */ |
|
| 217 | - public function getParsedMessage(); |
|
| 218 | - |
|
| 219 | - /** |
|
| 220 | - * Set a RichObjectString message |
|
| 221 | - * |
|
| 222 | - * HTML is not allowed in the rich message and will be escaped automatically |
|
| 223 | - * by the clients, but you can use the RichObjectString system provided by |
|
| 224 | - * the Nextcloud server to highlight important parameters. |
|
| 225 | - * Also make sure, that a plain text message is always set via |
|
| 226 | - * setParsedMessage, to support clients which can not handle rich strings. |
|
| 227 | - * |
|
| 228 | - * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 229 | - * |
|
| 230 | - * @param string $message |
|
| 231 | - * @param array $parameters |
|
| 232 | - * @return $this |
|
| 233 | - * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 234 | - * @since 11.0.0 |
|
| 235 | - */ |
|
| 236 | - public function setRichMessage($message, array $parameters = []); |
|
| 237 | - |
|
| 238 | - /** |
|
| 239 | - * @return string |
|
| 240 | - * @since 11.0.0 |
|
| 241 | - */ |
|
| 242 | - public function getRichMessage(); |
|
| 243 | - |
|
| 244 | - /** |
|
| 245 | - * @return array[] |
|
| 246 | - * @since 11.0.0 |
|
| 247 | - */ |
|
| 248 | - public function getRichMessageParameters(); |
|
| 249 | - |
|
| 250 | - /** |
|
| 251 | - * @param string $link |
|
| 252 | - * @return $this |
|
| 253 | - * @throws \InvalidArgumentException if the link is invalid |
|
| 254 | - * @since 9.0.0 |
|
| 255 | - */ |
|
| 256 | - public function setLink($link); |
|
| 257 | - |
|
| 258 | - /** |
|
| 259 | - * @return string |
|
| 260 | - * @since 9.0.0 |
|
| 261 | - */ |
|
| 262 | - public function getLink(); |
|
| 263 | - |
|
| 264 | - /** |
|
| 265 | - * @param string $icon |
|
| 266 | - * @return $this |
|
| 267 | - * @throws \InvalidArgumentException if the icon is invalid |
|
| 268 | - * @since 11.0.0 |
|
| 269 | - */ |
|
| 270 | - public function setIcon($icon); |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * @return string |
|
| 274 | - * @since 11.0.0 |
|
| 275 | - */ |
|
| 276 | - public function getIcon(); |
|
| 277 | - |
|
| 278 | - /** |
|
| 279 | - * @return IAction |
|
| 280 | - * @since 9.0.0 |
|
| 281 | - */ |
|
| 282 | - public function createAction(); |
|
| 283 | - |
|
| 284 | - /** |
|
| 285 | - * @param IAction $action |
|
| 286 | - * @return $this |
|
| 287 | - * @throws \InvalidArgumentException if the action is invalid |
|
| 288 | - * @since 9.0.0 |
|
| 289 | - */ |
|
| 290 | - public function addAction(IAction $action); |
|
| 291 | - |
|
| 292 | - /** |
|
| 293 | - * @return IAction[] |
|
| 294 | - * @since 9.0.0 |
|
| 295 | - */ |
|
| 296 | - public function getActions(); |
|
| 297 | - |
|
| 298 | - /** |
|
| 299 | - * @param IAction $action |
|
| 300 | - * @return $this |
|
| 301 | - * @throws \InvalidArgumentException if the action is invalid |
|
| 302 | - * @since 9.0.0 |
|
| 303 | - */ |
|
| 304 | - public function addParsedAction(IAction $action); |
|
| 305 | - |
|
| 306 | - /** |
|
| 307 | - * @return IAction[] |
|
| 308 | - * @since 9.0.0 |
|
| 309 | - */ |
|
| 310 | - public function getParsedActions(); |
|
| 311 | - |
|
| 312 | - /** |
|
| 313 | - * @return bool |
|
| 314 | - * @since 9.0.0 |
|
| 315 | - */ |
|
| 316 | - public function isValid(); |
|
| 317 | - |
|
| 318 | - /** |
|
| 319 | - * @return bool |
|
| 320 | - * @since 9.0.0 |
|
| 321 | - */ |
|
| 322 | - public function isValidParsed(); |
|
| 33 | + /** |
|
| 34 | + * @param string $app |
|
| 35 | + * @return $this |
|
| 36 | + * @throws \InvalidArgumentException if the app id is invalid |
|
| 37 | + * @since 9.0.0 |
|
| 38 | + */ |
|
| 39 | + public function setApp($app); |
|
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * @return string |
|
| 43 | + * @since 9.0.0 |
|
| 44 | + */ |
|
| 45 | + public function getApp(); |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @param string $user |
|
| 49 | + * @return $this |
|
| 50 | + * @throws \InvalidArgumentException if the user id is invalid |
|
| 51 | + * @since 9.0.0 |
|
| 52 | + */ |
|
| 53 | + public function setUser($user); |
|
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * @return string |
|
| 57 | + * @since 9.0.0 |
|
| 58 | + */ |
|
| 59 | + public function getUser(); |
|
| 60 | + |
|
| 61 | + /** |
|
| 62 | + * @param \DateTime $dateTime |
|
| 63 | + * @return $this |
|
| 64 | + * @throws \InvalidArgumentException if the $dateTime is invalid |
|
| 65 | + * @since 9.0.0 |
|
| 66 | + */ |
|
| 67 | + public function setDateTime(\DateTime $dateTime); |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * @return \DateTime |
|
| 71 | + * @since 9.0.0 |
|
| 72 | + */ |
|
| 73 | + public function getDateTime(); |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @param string $type |
|
| 77 | + * @param string $id |
|
| 78 | + * @return $this |
|
| 79 | + * @throws \InvalidArgumentException if the object type or id is invalid |
|
| 80 | + * @since 9.0.0 |
|
| 81 | + */ |
|
| 82 | + public function setObject($type, $id); |
|
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * @return string |
|
| 86 | + * @since 9.0.0 |
|
| 87 | + */ |
|
| 88 | + public function getObjectType(); |
|
| 89 | + |
|
| 90 | + /** |
|
| 91 | + * @return string |
|
| 92 | + * @since 9.0.0 |
|
| 93 | + */ |
|
| 94 | + public function getObjectId(); |
|
| 95 | + |
|
| 96 | + /** |
|
| 97 | + * @param string $subject |
|
| 98 | + * @param array $parameters |
|
| 99 | + * @return $this |
|
| 100 | + * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 101 | + * @since 9.0.0 |
|
| 102 | + */ |
|
| 103 | + public function setSubject($subject, array $parameters = []); |
|
| 104 | + |
|
| 105 | + /** |
|
| 106 | + * @return string |
|
| 107 | + * @since 9.0.0 |
|
| 108 | + */ |
|
| 109 | + public function getSubject(); |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * @return string[] |
|
| 113 | + * @since 9.0.0 |
|
| 114 | + */ |
|
| 115 | + public function getSubjectParameters(); |
|
| 116 | + |
|
| 117 | + /** |
|
| 118 | + * Set a parsed subject |
|
| 119 | + * |
|
| 120 | + * HTML is not allowed in the parsed subject and will be escaped |
|
| 121 | + * automatically by the clients. You can use the RichObjectString system |
|
| 122 | + * provided by the Nextcloud server to highlight important parameters via |
|
| 123 | + * the setRichSubject method, but make sure, that a plain text message is |
|
| 124 | + * always set via setParsedSubject, to support clients which can not handle |
|
| 125 | + * rich strings. |
|
| 126 | + * |
|
| 127 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 128 | + * |
|
| 129 | + * @param string $subject |
|
| 130 | + * @return $this |
|
| 131 | + * @throws \InvalidArgumentException if the subject is invalid |
|
| 132 | + * @since 9.0.0 |
|
| 133 | + */ |
|
| 134 | + public function setParsedSubject($subject); |
|
| 135 | + |
|
| 136 | + /** |
|
| 137 | + * @return string |
|
| 138 | + * @since 9.0.0 |
|
| 139 | + */ |
|
| 140 | + public function getParsedSubject(); |
|
| 141 | + |
|
| 142 | + /** |
|
| 143 | + * Set a RichObjectString subject |
|
| 144 | + * |
|
| 145 | + * HTML is not allowed in the rich subject and will be escaped automatically |
|
| 146 | + * by the clients, but you can use the RichObjectString system provided by |
|
| 147 | + * the Nextcloud server to highlight important parameters. |
|
| 148 | + * Also make sure, that a plain text subject is always set via |
|
| 149 | + * setParsedSubject, to support clients which can not handle rich strings. |
|
| 150 | + * |
|
| 151 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 152 | + * |
|
| 153 | + * @param string $subject |
|
| 154 | + * @param array $parameters |
|
| 155 | + * @return $this |
|
| 156 | + * @throws \InvalidArgumentException if the subject or parameters are invalid |
|
| 157 | + * @since 11.0.0 |
|
| 158 | + */ |
|
| 159 | + public function setRichSubject($subject, array $parameters = []); |
|
| 160 | + |
|
| 161 | + /** |
|
| 162 | + * @return string |
|
| 163 | + * @since 11.0.0 |
|
| 164 | + */ |
|
| 165 | + public function getRichSubject(); |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * @return array[] |
|
| 169 | + * @since 11.0.0 |
|
| 170 | + */ |
|
| 171 | + public function getRichSubjectParameters(); |
|
| 172 | + |
|
| 173 | + /** |
|
| 174 | + * @param string $message |
|
| 175 | + * @param array $parameters |
|
| 176 | + * @return $this |
|
| 177 | + * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 178 | + * @since 9.0.0 |
|
| 179 | + */ |
|
| 180 | + public function setMessage($message, array $parameters = []); |
|
| 181 | + |
|
| 182 | + /** |
|
| 183 | + * @return string |
|
| 184 | + * @since 9.0.0 |
|
| 185 | + */ |
|
| 186 | + public function getMessage(); |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * @return string[] |
|
| 190 | + * @since 9.0.0 |
|
| 191 | + */ |
|
| 192 | + public function getMessageParameters(); |
|
| 193 | + |
|
| 194 | + /** |
|
| 195 | + * Set a parsed message |
|
| 196 | + * |
|
| 197 | + * HTML is not allowed in the parsed message and will be escaped |
|
| 198 | + * automatically by the clients. You can use the RichObjectString system |
|
| 199 | + * provided by the Nextcloud server to highlight important parameters via |
|
| 200 | + * the setRichMessage method, but make sure, that a plain text message is |
|
| 201 | + * always set via setParsedMessage, to support clients which can not handle |
|
| 202 | + * rich strings. |
|
| 203 | + * |
|
| 204 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 205 | + * |
|
| 206 | + * @param string $message |
|
| 207 | + * @return $this |
|
| 208 | + * @throws \InvalidArgumentException if the message is invalid |
|
| 209 | + * @since 9.0.0 |
|
| 210 | + */ |
|
| 211 | + public function setParsedMessage($message); |
|
| 212 | + |
|
| 213 | + /** |
|
| 214 | + * @return string |
|
| 215 | + * @since 9.0.0 |
|
| 216 | + */ |
|
| 217 | + public function getParsedMessage(); |
|
| 218 | + |
|
| 219 | + /** |
|
| 220 | + * Set a RichObjectString message |
|
| 221 | + * |
|
| 222 | + * HTML is not allowed in the rich message and will be escaped automatically |
|
| 223 | + * by the clients, but you can use the RichObjectString system provided by |
|
| 224 | + * the Nextcloud server to highlight important parameters. |
|
| 225 | + * Also make sure, that a plain text message is always set via |
|
| 226 | + * setParsedMessage, to support clients which can not handle rich strings. |
|
| 227 | + * |
|
| 228 | + * See https://github.com/nextcloud/server/issues/1706 for more information. |
|
| 229 | + * |
|
| 230 | + * @param string $message |
|
| 231 | + * @param array $parameters |
|
| 232 | + * @return $this |
|
| 233 | + * @throws \InvalidArgumentException if the message or parameters are invalid |
|
| 234 | + * @since 11.0.0 |
|
| 235 | + */ |
|
| 236 | + public function setRichMessage($message, array $parameters = []); |
|
| 237 | + |
|
| 238 | + /** |
|
| 239 | + * @return string |
|
| 240 | + * @since 11.0.0 |
|
| 241 | + */ |
|
| 242 | + public function getRichMessage(); |
|
| 243 | + |
|
| 244 | + /** |
|
| 245 | + * @return array[] |
|
| 246 | + * @since 11.0.0 |
|
| 247 | + */ |
|
| 248 | + public function getRichMessageParameters(); |
|
| 249 | + |
|
| 250 | + /** |
|
| 251 | + * @param string $link |
|
| 252 | + * @return $this |
|
| 253 | + * @throws \InvalidArgumentException if the link is invalid |
|
| 254 | + * @since 9.0.0 |
|
| 255 | + */ |
|
| 256 | + public function setLink($link); |
|
| 257 | + |
|
| 258 | + /** |
|
| 259 | + * @return string |
|
| 260 | + * @since 9.0.0 |
|
| 261 | + */ |
|
| 262 | + public function getLink(); |
|
| 263 | + |
|
| 264 | + /** |
|
| 265 | + * @param string $icon |
|
| 266 | + * @return $this |
|
| 267 | + * @throws \InvalidArgumentException if the icon is invalid |
|
| 268 | + * @since 11.0.0 |
|
| 269 | + */ |
|
| 270 | + public function setIcon($icon); |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * @return string |
|
| 274 | + * @since 11.0.0 |
|
| 275 | + */ |
|
| 276 | + public function getIcon(); |
|
| 277 | + |
|
| 278 | + /** |
|
| 279 | + * @return IAction |
|
| 280 | + * @since 9.0.0 |
|
| 281 | + */ |
|
| 282 | + public function createAction(); |
|
| 283 | + |
|
| 284 | + /** |
|
| 285 | + * @param IAction $action |
|
| 286 | + * @return $this |
|
| 287 | + * @throws \InvalidArgumentException if the action is invalid |
|
| 288 | + * @since 9.0.0 |
|
| 289 | + */ |
|
| 290 | + public function addAction(IAction $action); |
|
| 291 | + |
|
| 292 | + /** |
|
| 293 | + * @return IAction[] |
|
| 294 | + * @since 9.0.0 |
|
| 295 | + */ |
|
| 296 | + public function getActions(); |
|
| 297 | + |
|
| 298 | + /** |
|
| 299 | + * @param IAction $action |
|
| 300 | + * @return $this |
|
| 301 | + * @throws \InvalidArgumentException if the action is invalid |
|
| 302 | + * @since 9.0.0 |
|
| 303 | + */ |
|
| 304 | + public function addParsedAction(IAction $action); |
|
| 305 | + |
|
| 306 | + /** |
|
| 307 | + * @return IAction[] |
|
| 308 | + * @since 9.0.0 |
|
| 309 | + */ |
|
| 310 | + public function getParsedActions(); |
|
| 311 | + |
|
| 312 | + /** |
|
| 313 | + * @return bool |
|
| 314 | + * @since 9.0.0 |
|
| 315 | + */ |
|
| 316 | + public function isValid(); |
|
| 317 | + |
|
| 318 | + /** |
|
| 319 | + * @return bool |
|
| 320 | + * @since 9.0.0 |
|
| 321 | + */ |
|
| 322 | + public function isValidParsed(); |
|
| 323 | 323 | } |