@@ -31,52 +31,52 @@ |
||
31 | 31 | * @deprecated 20.0.0 |
32 | 32 | */ |
33 | 33 | class Result { |
34 | - /** |
|
35 | - * A unique identifier for the result, usually given as the item ID in its |
|
36 | - * corresponding application. |
|
37 | - * @var string |
|
38 | - * @since 7.0.0 |
|
39 | - * @deprecated 20.0.0 |
|
40 | - */ |
|
41 | - public $id; |
|
34 | + /** |
|
35 | + * A unique identifier for the result, usually given as the item ID in its |
|
36 | + * corresponding application. |
|
37 | + * @var string |
|
38 | + * @since 7.0.0 |
|
39 | + * @deprecated 20.0.0 |
|
40 | + */ |
|
41 | + public $id; |
|
42 | 42 | |
43 | - /** |
|
44 | - * The name of the item returned; this will be displayed in the search |
|
45 | - * results. |
|
46 | - * @var string |
|
47 | - * @since 7.0.0 |
|
48 | - * @deprecated 20.0.0 |
|
49 | - */ |
|
50 | - public $name; |
|
43 | + /** |
|
44 | + * The name of the item returned; this will be displayed in the search |
|
45 | + * results. |
|
46 | + * @var string |
|
47 | + * @since 7.0.0 |
|
48 | + * @deprecated 20.0.0 |
|
49 | + */ |
|
50 | + public $name; |
|
51 | 51 | |
52 | - /** |
|
53 | - * URL to the application item. |
|
54 | - * @var string |
|
55 | - * @since 7.0.0 |
|
56 | - * @deprecated 20.0.0 |
|
57 | - */ |
|
58 | - public $link; |
|
52 | + /** |
|
53 | + * URL to the application item. |
|
54 | + * @var string |
|
55 | + * @since 7.0.0 |
|
56 | + * @deprecated 20.0.0 |
|
57 | + */ |
|
58 | + public $link; |
|
59 | 59 | |
60 | - /** |
|
61 | - * The type of search result returned; for consistency, name this the same |
|
62 | - * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. |
|
63 | - * @var string |
|
64 | - * @since 7.0.0 |
|
65 | - * @deprecated 20.0.0 |
|
66 | - */ |
|
67 | - public $type = 'generic'; |
|
60 | + /** |
|
61 | + * The type of search result returned; for consistency, name this the same |
|
62 | + * as the class name (e.g. \OC\Search\File -> 'file') in lowercase. |
|
63 | + * @var string |
|
64 | + * @since 7.0.0 |
|
65 | + * @deprecated 20.0.0 |
|
66 | + */ |
|
67 | + public $type = 'generic'; |
|
68 | 68 | |
69 | - /** |
|
70 | - * Create a new search result |
|
71 | - * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]' |
|
72 | - * @param string $name displayed text of result |
|
73 | - * @param string $link URL to the result within its app |
|
74 | - * @since 7.0.0 |
|
75 | - * @deprecated 20.0.0 |
|
76 | - */ |
|
77 | - public function __construct($id = null, $name = null, $link = null) { |
|
78 | - $this->id = $id; |
|
79 | - $this->name = $name; |
|
80 | - $this->link = $link; |
|
81 | - } |
|
69 | + /** |
|
70 | + * Create a new search result |
|
71 | + * @param string $id unique identifier from application: '[app_name]/[item_identifier_in_app]' |
|
72 | + * @param string $name displayed text of result |
|
73 | + * @param string $link URL to the result within its app |
|
74 | + * @since 7.0.0 |
|
75 | + * @deprecated 20.0.0 |
|
76 | + */ |
|
77 | + public function __construct($id = null, $name = null, $link = null) { |
|
78 | + $this->id = $id; |
|
79 | + $this->name = $name; |
|
80 | + $this->link = $link; |
|
81 | + } |
|
82 | 82 | } |
@@ -32,66 +32,66 @@ |
||
32 | 32 | * @deprecated 20.0.0 |
33 | 33 | */ |
34 | 34 | abstract class Provider { |
35 | - /** |
|
36 | - * @since 8.0.0 |
|
37 | - * @deprecated 20.0.0 |
|
38 | - */ |
|
39 | - public const OPTION_APPS = 'apps'; |
|
35 | + /** |
|
36 | + * @since 8.0.0 |
|
37 | + * @deprecated 20.0.0 |
|
38 | + */ |
|
39 | + public const OPTION_APPS = 'apps'; |
|
40 | 40 | |
41 | - /** |
|
42 | - * List of options |
|
43 | - * @var array |
|
44 | - * @since 7.0.0 |
|
45 | - * @deprecated 20.0.0 |
|
46 | - */ |
|
47 | - protected $options; |
|
41 | + /** |
|
42 | + * List of options |
|
43 | + * @var array |
|
44 | + * @since 7.0.0 |
|
45 | + * @deprecated 20.0.0 |
|
46 | + */ |
|
47 | + protected $options; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Constructor |
|
51 | - * @param array $options as key => value |
|
52 | - * @since 7.0.0 - default value for $options was added in 8.0.0 |
|
53 | - * @deprecated 20.0.0 |
|
54 | - */ |
|
55 | - public function __construct($options = []) { |
|
56 | - $this->options = $options; |
|
57 | - } |
|
49 | + /** |
|
50 | + * Constructor |
|
51 | + * @param array $options as key => value |
|
52 | + * @since 7.0.0 - default value for $options was added in 8.0.0 |
|
53 | + * @deprecated 20.0.0 |
|
54 | + */ |
|
55 | + public function __construct($options = []) { |
|
56 | + $this->options = $options; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * get a value from the options array or null |
|
61 | - * @param string $key |
|
62 | - * @return mixed |
|
63 | - * @since 8.0.0 |
|
64 | - * @deprecated 20.0.0 |
|
65 | - */ |
|
66 | - public function getOption($key) { |
|
67 | - if (is_array($this->options) && isset($this->options[$key])) { |
|
68 | - return $this->options[$key]; |
|
69 | - } else { |
|
70 | - return null; |
|
71 | - } |
|
72 | - } |
|
59 | + /** |
|
60 | + * get a value from the options array or null |
|
61 | + * @param string $key |
|
62 | + * @return mixed |
|
63 | + * @since 8.0.0 |
|
64 | + * @deprecated 20.0.0 |
|
65 | + */ |
|
66 | + public function getOption($key) { |
|
67 | + if (is_array($this->options) && isset($this->options[$key])) { |
|
68 | + return $this->options[$key]; |
|
69 | + } else { |
|
70 | + return null; |
|
71 | + } |
|
72 | + } |
|
73 | 73 | |
74 | - /** |
|
75 | - * checks if the given apps and the apps this provider has results for intersect |
|
76 | - * returns true if the given array is empty (all apps) |
|
77 | - * or if this provider does not have a list of apps it provides results for (legacy search providers) |
|
78 | - * or if the two above arrays have elements in common (intersect) |
|
79 | - * @param string[] $apps |
|
80 | - * @return bool |
|
81 | - * @since 8.0.0 |
|
82 | - * @deprecated 20.0.0 |
|
83 | - */ |
|
84 | - public function providesResultsFor(array $apps = []) { |
|
85 | - $forApps = $this->getOption(self::OPTION_APPS); |
|
86 | - return empty($apps) || empty($forApps) || array_intersect($forApps, $apps); |
|
87 | - } |
|
74 | + /** |
|
75 | + * checks if the given apps and the apps this provider has results for intersect |
|
76 | + * returns true if the given array is empty (all apps) |
|
77 | + * or if this provider does not have a list of apps it provides results for (legacy search providers) |
|
78 | + * or if the two above arrays have elements in common (intersect) |
|
79 | + * @param string[] $apps |
|
80 | + * @return bool |
|
81 | + * @since 8.0.0 |
|
82 | + * @deprecated 20.0.0 |
|
83 | + */ |
|
84 | + public function providesResultsFor(array $apps = []) { |
|
85 | + $forApps = $this->getOption(self::OPTION_APPS); |
|
86 | + return empty($apps) || empty($forApps) || array_intersect($forApps, $apps); |
|
87 | + } |
|
88 | 88 | |
89 | - /** |
|
90 | - * Search for $query |
|
91 | - * @param string $query |
|
92 | - * @return array An array of OCP\Search\Result's |
|
93 | - * @since 7.0.0 |
|
94 | - * @deprecated 20.0.0 |
|
95 | - */ |
|
96 | - abstract public function search($query); |
|
89 | + /** |
|
90 | + * Search for $query |
|
91 | + * @param string $query |
|
92 | + * @return array An array of OCP\Search\Result's |
|
93 | + * @since 7.0.0 |
|
94 | + * @deprecated 20.0.0 |
|
95 | + */ |
|
96 | + abstract public function search($query); |
|
97 | 97 | } |
@@ -32,43 +32,43 @@ |
||
32 | 32 | * @deprecated 20.0.0 |
33 | 33 | */ |
34 | 34 | abstract class PagedProvider extends Provider { |
35 | - /** |
|
36 | - * show all results |
|
37 | - * @since 8.0.0 |
|
38 | - * @deprecated 20.0.0 |
|
39 | - */ |
|
40 | - public const SIZE_ALL = 0; |
|
35 | + /** |
|
36 | + * show all results |
|
37 | + * @since 8.0.0 |
|
38 | + * @deprecated 20.0.0 |
|
39 | + */ |
|
40 | + public const SIZE_ALL = 0; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Constructor |
|
44 | - * @param array $options |
|
45 | - * @since 8.0.0 |
|
46 | - * @deprecated 20.0.0 |
|
47 | - */ |
|
48 | - public function __construct($options) { |
|
49 | - parent::__construct($options); |
|
50 | - } |
|
42 | + /** |
|
43 | + * Constructor |
|
44 | + * @param array $options |
|
45 | + * @since 8.0.0 |
|
46 | + * @deprecated 20.0.0 |
|
47 | + */ |
|
48 | + public function __construct($options) { |
|
49 | + parent::__construct($options); |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Search for $query |
|
54 | - * @param string $query |
|
55 | - * @return array An array of OCP\Search\Result's |
|
56 | - * @since 8.0.0 |
|
57 | - * @deprecated 20.0.0 |
|
58 | - */ |
|
59 | - public function search($query) { |
|
60 | - // old apps might assume they get all results, so we use SIZE_ALL |
|
61 | - return $this->searchPaged($query, 1, self::SIZE_ALL); |
|
62 | - } |
|
52 | + /** |
|
53 | + * Search for $query |
|
54 | + * @param string $query |
|
55 | + * @return array An array of OCP\Search\Result's |
|
56 | + * @since 8.0.0 |
|
57 | + * @deprecated 20.0.0 |
|
58 | + */ |
|
59 | + public function search($query) { |
|
60 | + // old apps might assume they get all results, so we use SIZE_ALL |
|
61 | + return $this->searchPaged($query, 1, self::SIZE_ALL); |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * Search for $query |
|
66 | - * @param string $query |
|
67 | - * @param int $page pages start at page 1 |
|
68 | - * @param int $size 0 = SIZE_ALL |
|
69 | - * @return array An array of OCP\Search\Result's |
|
70 | - * @since 8.0.0 |
|
71 | - * @deprecated 20.0.0 |
|
72 | - */ |
|
73 | - abstract public function searchPaged($query, $page, $size); |
|
64 | + /** |
|
65 | + * Search for $query |
|
66 | + * @param string $query |
|
67 | + * @param int $page pages start at page 1 |
|
68 | + * @param int $size 0 = SIZE_ALL |
|
69 | + * @return array An array of OCP\Search\Result's |
|
70 | + * @since 8.0.0 |
|
71 | + * @deprecated 20.0.0 |
|
72 | + */ |
|
73 | + abstract public function searchPaged($query, $page, $size); |
|
74 | 74 | } |
@@ -34,105 +34,105 @@ |
||
34 | 34 | * @since 23.0.0 |
35 | 35 | */ |
36 | 36 | interface ICalendarQuery { |
37 | - /** |
|
38 | - * @since 24.0.0 |
|
39 | - */ |
|
40 | - public const SEARCH_PROPERTY_CATEGORIES = 'CATEGORIES'; |
|
41 | - |
|
42 | - /** |
|
43 | - * @since 24.0.0 |
|
44 | - */ |
|
45 | - public const SEARCH_PROPERTY_COMMENT = 'COMMENT'; |
|
46 | - |
|
47 | - /** |
|
48 | - * @since 24.0.0 |
|
49 | - */ |
|
50 | - public const SEARCH_PROPERTY_DESCRIPTION = 'DESCRIPTION'; |
|
51 | - |
|
52 | - /** |
|
53 | - * @since 24.0.0 |
|
54 | - */ |
|
55 | - public const SEARCH_PROPERTY_LOCATION = 'LOCATION'; |
|
56 | - |
|
57 | - /** |
|
58 | - * @since 24.0.0 |
|
59 | - */ |
|
60 | - public const SEARCH_PROPERTY_RESOURCES = 'RESOURCES'; |
|
61 | - |
|
62 | - /** |
|
63 | - * @since 24.0.0 |
|
64 | - */ |
|
65 | - public const SEARCH_PROPERTY_STATUS = 'STATUS'; |
|
66 | - |
|
67 | - /** |
|
68 | - * @since 24.0.0 |
|
69 | - */ |
|
70 | - public const SEARCH_PROPERTY_SUMMARY = 'SUMMARY'; |
|
71 | - |
|
72 | - /** |
|
73 | - * @since 24.0.0 |
|
74 | - */ |
|
75 | - public const SEARCH_PROPERTY_ATTENDEE = 'ATTENDEE'; |
|
76 | - |
|
77 | - /** |
|
78 | - * @since 24.0.0 |
|
79 | - */ |
|
80 | - public const SEARCH_PROPERTY_CONTACT = 'CONTACT'; |
|
81 | - |
|
82 | - /** |
|
83 | - * @since 24.0.0 |
|
84 | - */ |
|
85 | - public const SEARCH_PROPERTY_ORGANIZER = 'ORGANIZER'; |
|
86 | - |
|
87 | - /** |
|
88 | - * Limit the results to the calendar uri(s) |
|
89 | - * |
|
90 | - * @since 23.0.0 |
|
91 | - */ |
|
92 | - public function addSearchCalendar(string $calendarUri): void; |
|
93 | - |
|
94 | - /** |
|
95 | - * Search the property values |
|
96 | - * |
|
97 | - * @since 23.0.0 |
|
98 | - */ |
|
99 | - public function setSearchPattern(string $pattern): void; |
|
100 | - |
|
101 | - /** |
|
102 | - * Define the property name(s) to search for |
|
103 | - * |
|
104 | - * Note: Nextcloud only indexes *some* properties. You can not search for |
|
105 | - * arbitrary properties. |
|
106 | - * |
|
107 | - * @param string $value any of the ICalendarQuery::SEARCH_PROPERTY_* values |
|
108 | - * @psalm-param ICalendarQuery::SEARCH_PROPERTY_* $value |
|
109 | - * |
|
110 | - * @since 23.0.0 |
|
111 | - */ |
|
112 | - public function addSearchProperty(string $value): void; |
|
113 | - |
|
114 | - /** |
|
115 | - * @since 23.0.0 |
|
116 | - */ |
|
117 | - public function addType(string $value): void; |
|
118 | - |
|
119 | - /** |
|
120 | - * @since 23.0.0 |
|
121 | - */ |
|
122 | - public function setTimerangeStart(DateTimeImmutable $startTime): void; |
|
123 | - |
|
124 | - /** |
|
125 | - * @since 23.0.0 |
|
126 | - */ |
|
127 | - public function setTimerangeEnd(DateTimeImmutable $endTime): void; |
|
128 | - |
|
129 | - /** |
|
130 | - * @since 23.0.0 |
|
131 | - */ |
|
132 | - public function setLimit(int $limit): void; |
|
133 | - |
|
134 | - /** |
|
135 | - * @since 23.0.0 |
|
136 | - */ |
|
137 | - public function setOffset(int $offset): void; |
|
37 | + /** |
|
38 | + * @since 24.0.0 |
|
39 | + */ |
|
40 | + public const SEARCH_PROPERTY_CATEGORIES = 'CATEGORIES'; |
|
41 | + |
|
42 | + /** |
|
43 | + * @since 24.0.0 |
|
44 | + */ |
|
45 | + public const SEARCH_PROPERTY_COMMENT = 'COMMENT'; |
|
46 | + |
|
47 | + /** |
|
48 | + * @since 24.0.0 |
|
49 | + */ |
|
50 | + public const SEARCH_PROPERTY_DESCRIPTION = 'DESCRIPTION'; |
|
51 | + |
|
52 | + /** |
|
53 | + * @since 24.0.0 |
|
54 | + */ |
|
55 | + public const SEARCH_PROPERTY_LOCATION = 'LOCATION'; |
|
56 | + |
|
57 | + /** |
|
58 | + * @since 24.0.0 |
|
59 | + */ |
|
60 | + public const SEARCH_PROPERTY_RESOURCES = 'RESOURCES'; |
|
61 | + |
|
62 | + /** |
|
63 | + * @since 24.0.0 |
|
64 | + */ |
|
65 | + public const SEARCH_PROPERTY_STATUS = 'STATUS'; |
|
66 | + |
|
67 | + /** |
|
68 | + * @since 24.0.0 |
|
69 | + */ |
|
70 | + public const SEARCH_PROPERTY_SUMMARY = 'SUMMARY'; |
|
71 | + |
|
72 | + /** |
|
73 | + * @since 24.0.0 |
|
74 | + */ |
|
75 | + public const SEARCH_PROPERTY_ATTENDEE = 'ATTENDEE'; |
|
76 | + |
|
77 | + /** |
|
78 | + * @since 24.0.0 |
|
79 | + */ |
|
80 | + public const SEARCH_PROPERTY_CONTACT = 'CONTACT'; |
|
81 | + |
|
82 | + /** |
|
83 | + * @since 24.0.0 |
|
84 | + */ |
|
85 | + public const SEARCH_PROPERTY_ORGANIZER = 'ORGANIZER'; |
|
86 | + |
|
87 | + /** |
|
88 | + * Limit the results to the calendar uri(s) |
|
89 | + * |
|
90 | + * @since 23.0.0 |
|
91 | + */ |
|
92 | + public function addSearchCalendar(string $calendarUri): void; |
|
93 | + |
|
94 | + /** |
|
95 | + * Search the property values |
|
96 | + * |
|
97 | + * @since 23.0.0 |
|
98 | + */ |
|
99 | + public function setSearchPattern(string $pattern): void; |
|
100 | + |
|
101 | + /** |
|
102 | + * Define the property name(s) to search for |
|
103 | + * |
|
104 | + * Note: Nextcloud only indexes *some* properties. You can not search for |
|
105 | + * arbitrary properties. |
|
106 | + * |
|
107 | + * @param string $value any of the ICalendarQuery::SEARCH_PROPERTY_* values |
|
108 | + * @psalm-param ICalendarQuery::SEARCH_PROPERTY_* $value |
|
109 | + * |
|
110 | + * @since 23.0.0 |
|
111 | + */ |
|
112 | + public function addSearchProperty(string $value): void; |
|
113 | + |
|
114 | + /** |
|
115 | + * @since 23.0.0 |
|
116 | + */ |
|
117 | + public function addType(string $value): void; |
|
118 | + |
|
119 | + /** |
|
120 | + * @since 23.0.0 |
|
121 | + */ |
|
122 | + public function setTimerangeStart(DateTimeImmutable $startTime): void; |
|
123 | + |
|
124 | + /** |
|
125 | + * @since 23.0.0 |
|
126 | + */ |
|
127 | + public function setTimerangeEnd(DateTimeImmutable $endTime): void; |
|
128 | + |
|
129 | + /** |
|
130 | + * @since 23.0.0 |
|
131 | + */ |
|
132 | + public function setLimit(int $limit): void; |
|
133 | + |
|
134 | + /** |
|
135 | + * @since 23.0.0 |
|
136 | + */ |
|
137 | + public function setOffset(int $offset): void; |
|
138 | 138 | } |
@@ -28,50 +28,50 @@ |
||
28 | 28 | * @since 14.0.0 |
29 | 29 | */ |
30 | 30 | interface IResource { |
31 | - /** |
|
32 | - * get the resource id |
|
33 | - * |
|
34 | - * This id has to be unique within the backend |
|
35 | - * |
|
36 | - * @return string |
|
37 | - * @since 14.0.0 |
|
38 | - */ |
|
39 | - public function getId():string; |
|
31 | + /** |
|
32 | + * get the resource id |
|
33 | + * |
|
34 | + * This id has to be unique within the backend |
|
35 | + * |
|
36 | + * @return string |
|
37 | + * @since 14.0.0 |
|
38 | + */ |
|
39 | + public function getId():string; |
|
40 | 40 | |
41 | - /** |
|
42 | - * get the display name for a resource |
|
43 | - * |
|
44 | - * @return string |
|
45 | - * @since 14.0.0 |
|
46 | - */ |
|
47 | - public function getDisplayName():string; |
|
41 | + /** |
|
42 | + * get the display name for a resource |
|
43 | + * |
|
44 | + * @return string |
|
45 | + * @since 14.0.0 |
|
46 | + */ |
|
47 | + public function getDisplayName():string; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Get a list of groupIds that are allowed to access this resource |
|
51 | - * |
|
52 | - * If an empty array is returned, no group restrictions are |
|
53 | - * applied. |
|
54 | - * |
|
55 | - * @return string[] |
|
56 | - * @since 14.0.0 |
|
57 | - */ |
|
58 | - public function getGroupRestrictions():array; |
|
49 | + /** |
|
50 | + * Get a list of groupIds that are allowed to access this resource |
|
51 | + * |
|
52 | + * If an empty array is returned, no group restrictions are |
|
53 | + * applied. |
|
54 | + * |
|
55 | + * @return string[] |
|
56 | + * @since 14.0.0 |
|
57 | + */ |
|
58 | + public function getGroupRestrictions():array; |
|
59 | 59 | |
60 | - /** |
|
61 | - * get email-address for resource |
|
62 | - * |
|
63 | - * The email address has to be globally unique |
|
64 | - * |
|
65 | - * @return string |
|
66 | - * @since 14.0.0 |
|
67 | - */ |
|
68 | - public function getEMail():string; |
|
60 | + /** |
|
61 | + * get email-address for resource |
|
62 | + * |
|
63 | + * The email address has to be globally unique |
|
64 | + * |
|
65 | + * @return string |
|
66 | + * @since 14.0.0 |
|
67 | + */ |
|
68 | + public function getEMail():string; |
|
69 | 69 | |
70 | - /** |
|
71 | - * Get corresponding backend object |
|
72 | - * |
|
73 | - * @return IBackend |
|
74 | - * @since 14.0.0 |
|
75 | - */ |
|
76 | - public function getBackend():IBackend; |
|
70 | + /** |
|
71 | + * Get corresponding backend object |
|
72 | + * |
|
73 | + * @return IBackend |
|
74 | + * @since 14.0.0 |
|
75 | + */ |
|
76 | + public function getBackend():IBackend; |
|
77 | 77 | } |
@@ -31,39 +31,39 @@ |
||
31 | 31 | * @since 14.0.0 |
32 | 32 | */ |
33 | 33 | interface IBackend { |
34 | - /** |
|
35 | - * get a list of all resources in this backend |
|
36 | - * |
|
37 | - * @throws BackendTemporarilyUnavailableException |
|
38 | - * @return IResource[] |
|
39 | - * @since 14.0.0 |
|
40 | - */ |
|
41 | - public function getAllResources():array; |
|
34 | + /** |
|
35 | + * get a list of all resources in this backend |
|
36 | + * |
|
37 | + * @throws BackendTemporarilyUnavailableException |
|
38 | + * @return IResource[] |
|
39 | + * @since 14.0.0 |
|
40 | + */ |
|
41 | + public function getAllResources():array; |
|
42 | 42 | |
43 | - /** |
|
44 | - * get a list of all resource identifiers in this backend |
|
45 | - * |
|
46 | - * @throws BackendTemporarilyUnavailableException |
|
47 | - * @return string[] |
|
48 | - * @since 14.0.0 |
|
49 | - */ |
|
50 | - public function listAllResources():array; |
|
43 | + /** |
|
44 | + * get a list of all resource identifiers in this backend |
|
45 | + * |
|
46 | + * @throws BackendTemporarilyUnavailableException |
|
47 | + * @return string[] |
|
48 | + * @since 14.0.0 |
|
49 | + */ |
|
50 | + public function listAllResources():array; |
|
51 | 51 | |
52 | - /** |
|
53 | - * get a resource by it's id |
|
54 | - * |
|
55 | - * @param string $id |
|
56 | - * @throws BackendTemporarilyUnavailableException |
|
57 | - * @return IResource|null |
|
58 | - * @since 14.0.0 |
|
59 | - */ |
|
60 | - public function getResource($id); |
|
52 | + /** |
|
53 | + * get a resource by it's id |
|
54 | + * |
|
55 | + * @param string $id |
|
56 | + * @throws BackendTemporarilyUnavailableException |
|
57 | + * @return IResource|null |
|
58 | + * @since 14.0.0 |
|
59 | + */ |
|
60 | + public function getResource($id); |
|
61 | 61 | |
62 | - /** |
|
63 | - * Get unique identifier of the backend |
|
64 | - * |
|
65 | - * @return string |
|
66 | - * @since 14.0.0 |
|
67 | - */ |
|
68 | - public function getBackendIdentifier():string; |
|
62 | + /** |
|
63 | + * Get unique identifier of the backend |
|
64 | + * |
|
65 | + * @return string |
|
66 | + * @since 14.0.0 |
|
67 | + */ |
|
68 | + public function getBackendIdentifier():string; |
|
69 | 69 | } |
@@ -32,84 +32,84 @@ |
||
32 | 32 | * @since 17.0.0 |
33 | 33 | */ |
34 | 34 | interface IResourceMetadata { |
35 | - /** |
|
36 | - * Type of resource |
|
37 | - * |
|
38 | - * Allowed values for this key include: |
|
39 | - * - projector |
|
40 | - * - tv |
|
41 | - * - vehicle |
|
42 | - * - other |
|
43 | - * |
|
44 | - * @since 17.0.0 |
|
45 | - */ |
|
46 | - public const RESOURCE_TYPE = '{http://nextcloud.com/ns}resource-type'; |
|
35 | + /** |
|
36 | + * Type of resource |
|
37 | + * |
|
38 | + * Allowed values for this key include: |
|
39 | + * - projector |
|
40 | + * - tv |
|
41 | + * - vehicle |
|
42 | + * - other |
|
43 | + * |
|
44 | + * @since 17.0.0 |
|
45 | + */ |
|
46 | + public const RESOURCE_TYPE = '{http://nextcloud.com/ns}resource-type'; |
|
47 | 47 | |
48 | - /** |
|
49 | - * If resource is of type vehicle, this describes the type of vehicle |
|
50 | - * |
|
51 | - * Allowed values: |
|
52 | - * - bicycle |
|
53 | - * - scooter |
|
54 | - * - motorbike |
|
55 | - * - car |
|
56 | - * - plane |
|
57 | - * - helicopter |
|
58 | - * - other |
|
59 | - * |
|
60 | - * @since 17.0.0 |
|
61 | - */ |
|
62 | - public const VEHICLE_TYPE = '{http://nextcloud.com/ns}resource-vehicle-type'; |
|
48 | + /** |
|
49 | + * If resource is of type vehicle, this describes the type of vehicle |
|
50 | + * |
|
51 | + * Allowed values: |
|
52 | + * - bicycle |
|
53 | + * - scooter |
|
54 | + * - motorbike |
|
55 | + * - car |
|
56 | + * - plane |
|
57 | + * - helicopter |
|
58 | + * - other |
|
59 | + * |
|
60 | + * @since 17.0.0 |
|
61 | + */ |
|
62 | + public const VEHICLE_TYPE = '{http://nextcloud.com/ns}resource-vehicle-type'; |
|
63 | 63 | |
64 | - /** |
|
65 | - * Make of the vehicle |
|
66 | - * |
|
67 | - * @since 17.0.0 |
|
68 | - */ |
|
69 | - public const VEHICLE_MAKE = '{http://nextcloud.com/ns}resource-vehicle-make'; |
|
64 | + /** |
|
65 | + * Make of the vehicle |
|
66 | + * |
|
67 | + * @since 17.0.0 |
|
68 | + */ |
|
69 | + public const VEHICLE_MAKE = '{http://nextcloud.com/ns}resource-vehicle-make'; |
|
70 | 70 | |
71 | - /** |
|
72 | - * Model of the vehicle |
|
73 | - * |
|
74 | - * @since 17.0.0 |
|
75 | - */ |
|
76 | - public const VEHICLE_MODEL = '{http://nextcloud.com/ns}resource-vehicle-model'; |
|
71 | + /** |
|
72 | + * Model of the vehicle |
|
73 | + * |
|
74 | + * @since 17.0.0 |
|
75 | + */ |
|
76 | + public const VEHICLE_MODEL = '{http://nextcloud.com/ns}resource-vehicle-model'; |
|
77 | 77 | |
78 | - /** |
|
79 | - * Whether or not the car is electric |
|
80 | - * |
|
81 | - * use '1' for electric, '0' for non-electric |
|
82 | - * |
|
83 | - * @since 17.0.0 |
|
84 | - */ |
|
85 | - public const VEHICLE_IS_ELECTRIC = '{http://nextcloud.com/ns}resource-vehicle-is-electric'; |
|
78 | + /** |
|
79 | + * Whether or not the car is electric |
|
80 | + * |
|
81 | + * use '1' for electric, '0' for non-electric |
|
82 | + * |
|
83 | + * @since 17.0.0 |
|
84 | + */ |
|
85 | + public const VEHICLE_IS_ELECTRIC = '{http://nextcloud.com/ns}resource-vehicle-is-electric'; |
|
86 | 86 | |
87 | - /** |
|
88 | - * Range of vehicle with a full tank |
|
89 | - * |
|
90 | - * @since 17.0.0 |
|
91 | - */ |
|
92 | - public const VEHICLE_RANGE = '{http://nextcloud.com/ns}resource-vehicle-range'; |
|
87 | + /** |
|
88 | + * Range of vehicle with a full tank |
|
89 | + * |
|
90 | + * @since 17.0.0 |
|
91 | + */ |
|
92 | + public const VEHICLE_RANGE = '{http://nextcloud.com/ns}resource-vehicle-range'; |
|
93 | 93 | |
94 | - /** |
|
95 | - * Seating capacity of the vehicle |
|
96 | - * |
|
97 | - * @since 17.0.0 |
|
98 | - */ |
|
99 | - public const VEHICLE_SEATING_CAPACITY = '{http://nextcloud.com/ns}resource-vehicle-seating-capacity'; |
|
94 | + /** |
|
95 | + * Seating capacity of the vehicle |
|
96 | + * |
|
97 | + * @since 17.0.0 |
|
98 | + */ |
|
99 | + public const VEHICLE_SEATING_CAPACITY = '{http://nextcloud.com/ns}resource-vehicle-seating-capacity'; |
|
100 | 100 | |
101 | - /** |
|
102 | - * Contact information about the person who is responsible to administer / maintain this resource |
|
103 | - * This key stores a textual description of name and possible ways to contact the person |
|
104 | - * |
|
105 | - * @since 17.0.0 |
|
106 | - */ |
|
107 | - public const CONTACT_PERSON = '{http://nextcloud.com/ns}resource-contact-person'; |
|
101 | + /** |
|
102 | + * Contact information about the person who is responsible to administer / maintain this resource |
|
103 | + * This key stores a textual description of name and possible ways to contact the person |
|
104 | + * |
|
105 | + * @since 17.0.0 |
|
106 | + */ |
|
107 | + public const CONTACT_PERSON = '{http://nextcloud.com/ns}resource-contact-person'; |
|
108 | 108 | |
109 | - /** |
|
110 | - * Link to the vcard of the contact person |
|
111 | - * |
|
112 | - * @since 17.0.0 |
|
113 | - */ |
|
114 | - public const CONTACT_PERSON_VCARD = '{http://nextcloud.com/ns}resource-contact-person-vcard'; |
|
109 | + /** |
|
110 | + * Link to the vcard of the contact person |
|
111 | + * |
|
112 | + * @since 17.0.0 |
|
113 | + */ |
|
114 | + public const CONTACT_PERSON_VCARD = '{http://nextcloud.com/ns}resource-contact-person-vcard'; |
|
115 | 115 | } |
@@ -30,33 +30,33 @@ |
||
30 | 30 | * @since 17.0.0 |
31 | 31 | */ |
32 | 32 | interface IMetadataProvider { |
33 | - /** |
|
34 | - * Get a list of all metadata keys available for this room |
|
35 | - * |
|
36 | - * Room backends are allowed to return custom keys, beyond the ones |
|
37 | - * defined in this class. If they do, they should make sure to use their |
|
38 | - * own namespace. |
|
39 | - * |
|
40 | - * @return String[] - A list of available keys |
|
41 | - * @since 17.0.0 |
|
42 | - */ |
|
43 | - public function getAllAvailableMetadataKeys():array; |
|
33 | + /** |
|
34 | + * Get a list of all metadata keys available for this room |
|
35 | + * |
|
36 | + * Room backends are allowed to return custom keys, beyond the ones |
|
37 | + * defined in this class. If they do, they should make sure to use their |
|
38 | + * own namespace. |
|
39 | + * |
|
40 | + * @return String[] - A list of available keys |
|
41 | + * @since 17.0.0 |
|
42 | + */ |
|
43 | + public function getAllAvailableMetadataKeys():array; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Get whether or not a metadata key is set for this room |
|
47 | - * |
|
48 | - * @param string $key - The key to check for |
|
49 | - * @return bool - Whether or not key is available |
|
50 | - * @since 17.0.0 |
|
51 | - */ |
|
52 | - public function hasMetadataForKey(string $key):bool; |
|
45 | + /** |
|
46 | + * Get whether or not a metadata key is set for this room |
|
47 | + * |
|
48 | + * @param string $key - The key to check for |
|
49 | + * @return bool - Whether or not key is available |
|
50 | + * @since 17.0.0 |
|
51 | + */ |
|
52 | + public function hasMetadataForKey(string $key):bool; |
|
53 | 53 | |
54 | - /** |
|
55 | - * Get the value for a metadata key |
|
56 | - * |
|
57 | - * @param string $key - The key to check for |
|
58 | - * @return string|null - The value stored for the key, null if no value stored |
|
59 | - * @since 17.0.0 |
|
60 | - */ |
|
61 | - public function getMetadataForKey(string $key):?string; |
|
54 | + /** |
|
55 | + * Get the value for a metadata key |
|
56 | + * |
|
57 | + * @param string $key - The key to check for |
|
58 | + * @return string|null - The value stored for the key, null if no value stored |
|
59 | + * @since 17.0.0 |
|
60 | + */ |
|
61 | + public function getMetadataForKey(string $key):?string; |
|
62 | 62 | } |
@@ -28,50 +28,50 @@ |
||
28 | 28 | * @since 14.0.0 |
29 | 29 | */ |
30 | 30 | interface IRoom { |
31 | - /** |
|
32 | - * Get a unique ID for the room |
|
33 | - * |
|
34 | - * This id has to be unique within the backend |
|
35 | - * |
|
36 | - * @return string |
|
37 | - * @since 14.0.0 |
|
38 | - */ |
|
39 | - public function getId():string; |
|
31 | + /** |
|
32 | + * Get a unique ID for the room |
|
33 | + * |
|
34 | + * This id has to be unique within the backend |
|
35 | + * |
|
36 | + * @return string |
|
37 | + * @since 14.0.0 |
|
38 | + */ |
|
39 | + public function getId():string; |
|
40 | 40 | |
41 | - /** |
|
42 | - * Get the display name for the room |
|
43 | - * |
|
44 | - * @return string |
|
45 | - * @since 14.0.0 |
|
46 | - */ |
|
47 | - public function getDisplayName():string; |
|
41 | + /** |
|
42 | + * Get the display name for the room |
|
43 | + * |
|
44 | + * @return string |
|
45 | + * @since 14.0.0 |
|
46 | + */ |
|
47 | + public function getDisplayName():string; |
|
48 | 48 | |
49 | - /** |
|
50 | - * Get a list of groupIds that are allowed to access this room |
|
51 | - * |
|
52 | - * If an empty array is returned, no group restrictions are |
|
53 | - * applied. |
|
54 | - * |
|
55 | - * @return string[] |
|
56 | - * @since 14.0.0 |
|
57 | - */ |
|
58 | - public function getGroupRestrictions():array; |
|
49 | + /** |
|
50 | + * Get a list of groupIds that are allowed to access this room |
|
51 | + * |
|
52 | + * If an empty array is returned, no group restrictions are |
|
53 | + * applied. |
|
54 | + * |
|
55 | + * @return string[] |
|
56 | + * @since 14.0.0 |
|
57 | + */ |
|
58 | + public function getGroupRestrictions():array; |
|
59 | 59 | |
60 | - /** |
|
61 | - * Get the email-address for the room |
|
62 | - * |
|
63 | - * The email-address has to be globally unique |
|
64 | - * |
|
65 | - * @return string |
|
66 | - * @since 14.0.0 |
|
67 | - */ |
|
68 | - public function getEMail():string; |
|
60 | + /** |
|
61 | + * Get the email-address for the room |
|
62 | + * |
|
63 | + * The email-address has to be globally unique |
|
64 | + * |
|
65 | + * @return string |
|
66 | + * @since 14.0.0 |
|
67 | + */ |
|
68 | + public function getEMail():string; |
|
69 | 69 | |
70 | - /** |
|
71 | - * Get corresponding backend object |
|
72 | - * |
|
73 | - * @return IBackend |
|
74 | - * @since 14.0.0 |
|
75 | - */ |
|
76 | - public function getBackend():IBackend; |
|
70 | + /** |
|
71 | + * Get corresponding backend object |
|
72 | + * |
|
73 | + * @return IBackend |
|
74 | + * @since 14.0.0 |
|
75 | + */ |
|
76 | + public function getBackend():IBackend; |
|
77 | 77 | } |