diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-06 09:44:04 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-09-09 11:09:37 +0200 |
commit | 007be83a968e6aee649ff8de173163cb5ef93a86 (patch) | |
tree | 18e03c4a5562989bbd6482e9e6a47f3619b71e30 /lib/private/FullTextSearch/Model | |
parent | fc10fa592626d154a91d77d35c93beabdc7605c1 (diff) | |
download | nextcloud-server-fix/oc/inheritdoc.tar.gz nextcloud-server-fix/oc/inheritdoc.zip |
fix(OC): Remove doc blocks for OCP implementationsfix/oc/inheritdoc
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/FullTextSearch/Model')
-rw-r--r-- | lib/private/FullTextSearch/Model/DocumentAccess.php | 100 | ||||
-rw-r--r-- | lib/private/FullTextSearch/Model/IndexDocument.php | 285 | ||||
-rw-r--r-- | lib/private/FullTextSearch/Model/SearchOption.php | 57 | ||||
-rw-r--r-- | lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php | 40 | ||||
-rw-r--r-- | lib/private/FullTextSearch/Model/SearchTemplate.php | 59 |
5 files changed, 0 insertions, 541 deletions
diff --git a/lib/private/FullTextSearch/Model/DocumentAccess.php b/lib/private/FullTextSearch/Model/DocumentAccess.php index 9efffeaee88..48a99ce04a4 100644 --- a/lib/private/FullTextSearch/Model/DocumentAccess.php +++ b/lib/private/FullTextSearch/Model/DocumentAccess.php @@ -44,208 +44,108 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable { private array $links = []; - /** - * Owner of the document can be set at the init of the object. - * - * @since 16.0.0 - * - * IDocumentAccess constructor. - */ public function __construct(string $ownerId = '') { $this->setOwnerId($ownerId); } - /** - * Set the Owner of the document. - * - * @since 16.0.0 - */ public function setOwnerId(string $ownerId): IDocumentAccess { $this->ownerId = $ownerId; return $this; } - /** - * Get the Owner of the document. - * - * @since 16.0.0 - */ public function getOwnerId(): string { return $this->ownerId; } - /** - * Set the viewer of the document. - * - * @since 16.0.0 - */ public function setViewerId(string $viewerId): IDocumentAccess { $this->viewerId = $viewerId; return $this; } - /** - * Get the viewer of the document. - * - * @since 16.0.0 - */ public function getViewerId(): string { return $this->viewerId; } - /** - * Set the list of users that have read access to the document. - * - * @since 16.0.0 - */ public function setUsers(array $users): IDocumentAccess { $this->users = $users; return $this; } - /** - * Add an entry to the list of users that have read access to the document. - * - * @since 16.0.0 - */ public function addUser(string $user): IDocumentAccess { $this->users[] = $user; return $this; } - /** - * Add multiple entries to the list of users that have read access to the - * document. - * - * @since 16.0.0 - */ public function addUsers($users): IDocumentAccess { $this->users = array_merge($this->users, $users); return $this; } - /** - * Get the complete list of users that have read access to the document. - * - * @since 16.0.0 - */ public function getUsers(): array { return $this->users; } - /** - * Set the list of groups that have read access to the document. - * - * @since 16.0.0 - */ public function setGroups(array $groups): IDocumentAccess { $this->groups = $groups; return $this; } - /** - * Add an entry to the list of groups that have read access to the document. - * - * @since 16.0.0 - */ public function addGroup(string $group): IDocumentAccess { $this->groups[] = $group; return $this; } - /** - * Add multiple entries to the list of groups that have read access to the - * document. - * - * @since 16.0.0 - */ public function addGroups(array $groups): IDocumentAccess { $this->groups = array_merge($this->groups, $groups); return $this; } - /** - * Get the complete list of groups that have read access to the document. - * - * @since 16.0.0 - */ public function getGroups(): array { return $this->groups; } - /** - * Set the list of circles that have read access to the document. - * - * @since 16.0.0 - */ public function setCircles(array $circles): IDocumentAccess { $this->circles = $circles; return $this; } - /** - * Add an entry to the list of circles that have read access to the document. - * - * @since 16.0.0 - */ public function addCircle(string $circle): IDocumentAccess { $this->circles[] = $circle; return $this; } - /** - * Add multiple entries to the list of groups that have read access to the - * document. - * - * @since 16.0.0 - */ public function addCircles(array $circles): IDocumentAccess { $this->circles = array_merge($this->circles, $circles); return $this; } - /** - * Get the complete list of circles that have read access to the document. - * - * @since 16.0.0 - */ public function getCircles(): array { return $this->circles; } - /** - * Set the list of links that have read access to the document. - * - * @since 16.0.0 - */ public function setLinks(array $links): IDocumentAccess { $this->links = $links; return $this; } - /** - * Get the list of links that have read access to the document. - * - * @since 16.0.0 - */ public function getLinks(): array { return $this->links; } diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php index 8bd20bad1e0..a52f1e415ee 100644 --- a/lib/private/FullTextSearch/Model/IndexDocument.php +++ b/lib/private/FullTextSearch/Model/IndexDocument.php @@ -83,45 +83,22 @@ class IndexDocument implements IIndexDocument, JsonSerializable { } - /** - * Returns the Id of the original document. - * - * @since 15.0.0 - */ final public function getId(): string { return $this->id; } - /** - * Returns the Id of the provider. - * - * @since 15.0.0 - */ final public function getProviderId(): string { return $this->providerId; } - /** - * Set the Index related to the IIndexDocument. - * - * @see IIndex - * - * @since 15.0.0 - */ final public function setIndex(IIndex $index): IIndexDocument { $this->index = $index; return $this; } - /** - * Get the Index. - * - * @throws FullTextSearchIndexNotAvailableException - * @since 15.0.0 - */ final public function getIndex(): IIndex { if ($this->index === null) { throw new FullTextSearchIndexNotAvailableException('No IIndex generated'); @@ -130,137 +107,70 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this->index; } - /** - * return if Index is defined. - * - * @since 16.0.0 - */ final public function hasIndex(): bool { return $this->index !== null; } - /** - * Set the modified time of the original document. - * - * @since 15.0.0 - */ final public function setModifiedTime(int $modifiedTime): IIndexDocument { $this->modifiedTime = $modifiedTime; return $this; } - /** - * Get the modified time of the original document. - * - * @since 15.0.0 - */ final public function getModifiedTime(): int { return $this->modifiedTime; } - /** - * Check if the original document of the IIndexDocument is older than $time. - * - * @since 15.0.0 - */ final public function isOlderThan(int $time): bool { return ($this->modifiedTime < $time); } - /** - * Set the read rights of the original document using a IDocumentAccess. - * - * @see IDocumentAccess - * - * @since 15.0.0 - */ final public function setAccess(IDocumentAccess $access): IIndexDocument { $this->access = $access; return $this; } - /** - * Get the IDocumentAccess related to the original document. - * - * @since 15.0.0 - */ final public function getAccess(): IDocumentAccess { return $this->access; } - /** - * Add a tag to the list. - * - * @since 15.0.0 - */ final public function addTag(string $tag): IIndexDocument { $this->tags[] = $tag; return $this; } - /** - * Set the list of tags assigned to the original document. - * - * @since 15.0.0 - */ final public function setTags(array $tags): IIndexDocument { $this->tags = $tags; return $this; } - /** - * Get the list of tags assigned to the original document. - * - * @since 15.0.0 - */ final public function getTags(): array { return $this->tags; } - /** - * Add a meta tag to the list. - * - * @since 15.0.0 - */ final public function addMetaTag(string $tag): IIndexDocument { $this->metaTags[] = $tag; return $this; } - /** - * Set the list of meta tags assigned to the original document. - * - * @since 15.0.0 - */ final public function setMetaTags(array $tags): IIndexDocument { $this->metaTags = $tags; return $this; } - /** - * Get the list of meta tags assigned to the original document. - * - * @since 15.0.0 - */ final public function getMetaTags(): array { return $this->metaTags; } - /** - * Add a sub tag to the list. - * - * @since 15.0.0 - */ final public function addSubTag(string $sub, string $tag): IIndexDocument { if (!array_key_exists($sub, $this->subTags)) { $this->subTags[$sub] = []; @@ -272,24 +182,12 @@ class IndexDocument implements IIndexDocument, JsonSerializable { } - /** - * Set the list of sub tags assigned to the original document. - * - * @since 15.0.0 - */ final public function setSubTags(array $tags): IIndexDocument { $this->subTags = $tags; return $this; } - /** - * Get the list of sub tags assigned to the original document. - * If $formatted is true, the result will be formatted in a one - * dimensional array. - * - * @since 15.0.0 - */ final public function getSubTags(bool $formatted = false): array { if ($formatted === false) { return $this->subTags; @@ -308,55 +206,28 @@ class IndexDocument implements IIndexDocument, JsonSerializable { } - /** - * Set the source of the original document. - * - * @since 15.0.0 - */ final public function setSource(string $source): IIndexDocument { $this->source = $source; return $this; } - /** - * Get the source of the original document. - * - * @since 15.0.0 - */ final public function getSource(): string { return $this->source; } - /** - * Set the title of the original document. - * - * @since 15.0.0 - */ final public function setTitle(string $title): IIndexDocument { $this->title = $title; return $this; } - /** - * Get the title of the original document. - * - * @since 15.0.0 - */ final public function getTitle(): string { return $this->title; } - /** - * Set the content of the document. - * $encoded can be NOT_ENCODED or ENCODED_BASE64 if the content is raw or - * encoded in base64. - * - * @since 15.0.0 - */ final public function setContent(string $content, int $encoded = 0): IIndexDocument { $this->content = $content; $this->contentEncoded = $encoded; @@ -364,39 +235,19 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this; } - /** - * Get the content of the original document. - * - * @since 15.0.0 - */ final public function getContent(): string { return $this->content; } - /** - * Returns the type of the encoding on the content. - * - * @since 15.0.0 - */ final public function isContentEncoded(): int { return $this->contentEncoded; } - /** - * Return the size of the content. - * - * @since 15.0.0 - */ final public function getContentSize(): int { return strlen($this->getContent()); } - /** - * Generate a hash, based on the content of the original document. - * - * @since 15.0.0 - */ final public function initHash(): IIndexDocument { if ($this->getContent() === '' || is_null($this->getContent())) { return $this; @@ -407,110 +258,56 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this; } - /** - * Set the hash of the original document. - * - * @since 15.0.0 - */ final public function setHash(string $hash): IIndexDocument { $this->hash = $hash; return $this; } - /** - * Get the hash of the original document. - * - * @since 15.0.0 - */ final public function getHash(): string { return $this->hash; } - /** - * Add a part, identified by a string, and its content. - * - * It is strongly advised to use alphanumerical chars with no space in the - * $part string. - * - * @since 15.0.0 - */ final public function addPart(string $part, string $content): IIndexDocument { $this->parts[$part] = $content; return $this; } - /** - * Set all parts and their content. - * - * @since 15.0.0 - */ final public function setParts(array $parts): IIndexDocument { $this->parts = $parts; return $this; } - /** - * Get all parts of the IIndexDocument. - * - * @since 15.0.0 - */ final public function getParts(): array { return $this->parts; } - /** - * Add a link, usable by the frontend. - * - * @since 15.0.0 - */ final public function setLink(string $link): IIndexDocument { $this->link = $link; return $this; } - /** - * Get the link. - * - * @since 15.0.0 - */ final public function getLink(): string { return $this->link; } - /** - * Set more information that couldn't be set using other method. - * - * @since 15.0.0 - */ final public function setMore(array $more): IIndexDocument { $this->more = $more; return $this; } - /** - * Get more information. - * - * @since 15.0.0 - */ final public function getMore(): array { return $this->more; } - /** - * Add some excerpt of the content of the original document, usually based - * on the search request. - * - * @since 16.0.0 - */ final public function addExcerpt(string $source, string $excerpt): IIndexDocument { $this->excerpts[] = [ @@ -522,11 +319,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable { } - /** - * Set all excerpts of the content of the original document. - * - * @since 16.0.0 - */ final public function setExcerpts(array $excerpts): IIndexDocument { $new = []; foreach ($excerpts as $entry) { @@ -541,11 +333,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this; } - /** - * Get all excerpts of the content of the original document. - * - * @since 15.0.0 - */ final public function getExcerpts(): array { return $this->excerpts; } @@ -567,48 +354,23 @@ class IndexDocument implements IIndexDocument, JsonSerializable { } - /** - * Set the score to the result assigned to this document during a search - * request. - * - * @since 15.0.0 - */ final public function setScore(string $score): IIndexDocument { $this->score = $score; return $this; } - /** - * Get the score. - * - * @since 15.0.0 - */ final public function getScore(): string { return $this->score; } - /** - * Set some information about the original document that will be available - * to the front-end when displaying search result. (as string) - * Because this information will not be indexed, this method can also be - * used to manage some data while filling the IIndexDocument before its - * indexing. - * - * @since 15.0.0 - */ final public function setInfo(string $info, string $value): IIndexDocument { $this->info[$info] = $value; return $this; } - /** - * Get an information about a document. (string) - * - * @since 15.0.0 - */ final public function getInfo(string $info, string $default = ''): string { if (!key_exists($info, $this->info)) { return $default; @@ -617,26 +379,12 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this->info[$info]; } - /** - * Set some information about the original document that will be available - * to the front-end when displaying search result. (as array) - * Because this information will not be indexed, this method can also be - * used to manage some data while filling the IIndexDocument before its - * indexing. - * - * @since 15.0.0 - */ final public function setInfoArray(string $info, array $value): IIndexDocument { $this->info[$info] = $value; return $this; } - /** - * Get an information about a document. (array) - * - * @since 15.0.0 - */ final public function getInfoArray(string $info, array $default = []): array { if (!key_exists($info, $this->info)) { return $default; @@ -645,26 +393,12 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this->info[$info]; } - /** - * Set some information about the original document that will be available - * to the front-end when displaying search result. (as int) - * Because this information will not be indexed, this method can also be - * used to manage some data while filling the IIndexDocument before its - * indexing. - * - * @since 15.0.0 - */ final public function setInfoInt(string $info, int $value): IIndexDocument { $this->info[$info] = $value; return $this; } - /** - * Get an information about a document. (int) - * - * @since 15.0.0 - */ final public function getInfoInt(string $info, int $default = 0): int { if (!key_exists($info, $this->info)) { return $default; @@ -673,26 +407,12 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this->info[$info]; } - /** - * Set some information about the original document that will be available - * to the front-end when displaying search result. (as bool) - * Because this information will not be indexed, this method can also be - * used to manage some data while filling the IIndexDocument before its - * indexing. - * - * @since 15.0.0 - */ final public function setInfoBool(string $info, bool $value): IIndexDocument { $this->info[$info] = $value; return $this; } - /** - * Get an information about a document. (bool) - * - * @since 15.0.0 - */ final public function getInfoBool(string $info, bool $default = false): bool { if (!key_exists($info, $this->info)) { return $default; @@ -701,11 +421,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable { return $this->info[$info]; } - /** - * Get all info. - * - * @since 15.0.0 - */ final public function getInfoAll(): array { $info = []; foreach ($this->info as $k => $v) { diff --git a/lib/private/FullTextSearch/Model/SearchOption.php b/lib/private/FullTextSearch/Model/SearchOption.php index c7769a62138..3a20a0f26b1 100644 --- a/lib/private/FullTextSearch/Model/SearchOption.php +++ b/lib/private/FullTextSearch/Model/SearchOption.php @@ -84,112 +84,55 @@ final class SearchOption implements ISearchOption, JsonSerializable { } - /** - * Set the name/key of the option. - * The string should only contain alphanumerical chars and underscore. - * The key can be retrieved when using ISearchRequest::getOption - * - * @see ISearchRequest::getOption - * - * @since 15.0.0 - */ public function setName(string $name): ISearchOption { $this->name = $name; return $this; } - /** - * Get the name/key of the option. - * - * @since 15.0.0 - */ public function getName(): string { return $this->name; } - /** - * Set the title/display name of the option. - * - * @since 15.0.0 - */ public function setTitle(string $title): ISearchOption { $this->title = $title; return $this; } - /** - * Get the title of the option. - * - * @since 15.0.0 - */ public function getTitle(): string { return $this->title; } - /** - * Set the type of the option. - * $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT - * - * @since 15.0.0 - */ public function setType(string $type): ISearchOption { $this->type = $type; return $this; } - /** - * Get the type of the option. - * - * @since 15.0.0 - */ public function getType(): string { return $this->type; } - /** - * In case of Type is INPUT, set the size of the input field. - * Value can be ISearchOption::INPUT_SMALL or not defined. - * - * @since 15.0.0 - */ public function setSize(string $size): ISearchOption { $this->size = $size; return $this; } - /** - * Get the size of the INPUT. - * - * @since 15.0.0 - */ public function getSize(): string { return $this->size; } - /** - * In case of Type is , set the placeholder to be displayed in the input - * field. - * - * @since 15.0.0 - */ public function setPlaceholder(string $placeholder): ISearchOption { $this->placeholder = $placeholder; return $this; } - /** - * Get the placeholder. - * - * @since 15.0.0 - */ public function getPlaceholder(): string { return $this->placeholder; } diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php index 5b075daf7e6..17b148f29e0 100644 --- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php +++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php @@ -33,30 +33,15 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS } - /** - * Get the compare type of the query - * - * @since 17.0.0 - */ public function getType(): int { return $this->type; } - /** - * Get the field to apply query - * - * @since 17.0.0 - */ public function getField(): string { return $this->field; } - /** - * Set the field to apply query - * - * @since 17.0.0 - */ public function setField(string $field): ISearchRequestSimpleQuery { $this->field = $field; @@ -64,54 +49,29 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS } - /** - * Get the value to compare (string) - * - * @since 17.0.0 - */ public function getValues(): array { return $this->values; } - /** - * Add value to compare (string) - * - * @since 17.0.0 - */ public function addValue(string $value): ISearchRequestSimpleQuery { $this->values[] = $value; return $this; } - /** - * Add value to compare (int) - * - * @since 17.0.0 - */ public function addValueInt(int $value): ISearchRequestSimpleQuery { $this->values[] = $value; return $this; } - /** - * Add value to compare (array) - * - * @since 17.0.0 - */ public function addValueArray(array $value): ISearchRequestSimpleQuery { $this->values[] = $value; return $this; } - /** - * Add value to compare (bool) - * - * @since 17.0.0 - */ public function addValueBool(bool $value): ISearchRequestSimpleQuery { $this->values[] = $value; diff --git a/lib/private/FullTextSearch/Model/SearchTemplate.php b/lib/private/FullTextSearch/Model/SearchTemplate.php index c2929bea139..2277f184a1e 100644 --- a/lib/private/FullTextSearch/Model/SearchTemplate.php +++ b/lib/private/FullTextSearch/Model/SearchTemplate.php @@ -62,115 +62,56 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable { } - /** - * Set the class of the icon to be displayed in the left panel of the - * FullTextSearch navigation page, in front of the related Content Provider. - * - * @since 15.0.0 - */ public function setIcon(string $class): ISearchTemplate { $this->icon = $class; return $this; } - /** - * Get the class of the icon. - */ public function getIcon(): string { return $this->icon; } - /** - * Set the path of a CSS file that will be loaded when needed. - * - * @since 15.0.0 - */ public function setCss(string $css): ISearchTemplate { $this->css = $css; return $this; } - /** - * Get the path of the CSS file. - * - * @since 15.0.0 - */ public function getCss(): string { return $this->css; } - /** - * Set the path of the file of a template that the HTML will be displayed - * below the Options. - * This should only be used if your Content Provider needs to set options in - * a way not generated by FullTextSearch - * - * @since 15.0.0 - */ public function setTemplate(string $template): ISearchTemplate { $this->template = $template; return $this; } - /** - * Get the path of the template file. - * - * @since 15.0.0 - */ public function getTemplate(): string { return $this->template; } - /** - * Add an option in the Panel that is displayed when the user start a search - * within the app that generate the content. - * - * @see ISearchOption - * - * @since 15.0.0 - */ public function addPanelOption(ISearchOption $option): ISearchTemplate { $this->panelOptions[] = $option; return $this; } - /** - * Get all options to be displayed in the Panel. - * - * @since 15.0.0 - * - * @return SearchOption[] - */ public function getPanelOptions(): array { return $this->panelOptions; } - /** - * Add an option in the left panel of the FullTextSearch navigation page. - * - * @see ISearchOption - * - * @since 15.0.0 - */ public function addNavigationOption(ISearchOption $option): ISearchTemplate { $this->navigationOptions[] = $option; return $this; } - /** - * Get all options to be displayed in the FullTextSearch navigation page. - * - * @since 15.0.0 - */ public function getNavigationOptions(): array { return $this->navigationOptions; } |