@@ -30,28 +30,28 @@ |
||
30 | 30 | |
31 | 31 | class ActionFactory implements IActionFactory { |
32 | 32 | |
33 | - /** |
|
34 | - * @param string $icon |
|
35 | - * @param string $name |
|
36 | - * @param string $href |
|
37 | - * @return ILinkAction |
|
38 | - */ |
|
39 | - public function newLinkAction($icon, $name, $href) { |
|
40 | - $action = new LinkAction(); |
|
41 | - $action->setName($name); |
|
42 | - $action->setIcon($icon); |
|
43 | - $action->setHref($href); |
|
44 | - return $action; |
|
45 | - } |
|
33 | + /** |
|
34 | + * @param string $icon |
|
35 | + * @param string $name |
|
36 | + * @param string $href |
|
37 | + * @return ILinkAction |
|
38 | + */ |
|
39 | + public function newLinkAction($icon, $name, $href) { |
|
40 | + $action = new LinkAction(); |
|
41 | + $action->setName($name); |
|
42 | + $action->setIcon($icon); |
|
43 | + $action->setHref($href); |
|
44 | + return $action; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @param string $icon |
|
49 | - * @param string $name |
|
50 | - * @param string $email |
|
51 | - * @return ILinkAction |
|
52 | - */ |
|
53 | - public function newEMailAction($icon, $name, $email) { |
|
54 | - return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email)); |
|
55 | - } |
|
47 | + /** |
|
48 | + * @param string $icon |
|
49 | + * @param string $name |
|
50 | + * @param string $email |
|
51 | + * @return ILinkAction |
|
52 | + */ |
|
53 | + public function newEMailAction($icon, $name, $email) { |
|
54 | + return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email)); |
|
55 | + } |
|
56 | 56 | |
57 | 57 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * @return ILinkAction |
52 | 52 | */ |
53 | 53 | public function newEMailAction($icon, $name, $email) { |
54 | - return $this->newLinkAction($icon, $name, 'mailto:' . urlencode($email)); |
|
54 | + return $this->newLinkAction($icon, $name, 'mailto:'.urlencode($email)); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | } |
@@ -28,76 +28,76 @@ |
||
28 | 28 | |
29 | 29 | class LinkAction implements ILinkAction { |
30 | 30 | |
31 | - /** @var string */ |
|
32 | - private $icon; |
|
33 | - |
|
34 | - /** @var string */ |
|
35 | - private $name; |
|
36 | - |
|
37 | - /** @var string */ |
|
38 | - private $href; |
|
39 | - |
|
40 | - /** @var int */ |
|
41 | - private $priority = 10; |
|
42 | - |
|
43 | - /** |
|
44 | - * @param string $icon absolute URI to an icon |
|
45 | - */ |
|
46 | - public function setIcon($icon) { |
|
47 | - $this->icon = $icon; |
|
48 | - } |
|
49 | - |
|
50 | - /** |
|
51 | - * @param string $name |
|
52 | - */ |
|
53 | - public function setName($name) { |
|
54 | - $this->name = $name; |
|
55 | - } |
|
56 | - |
|
57 | - /** |
|
58 | - * @return string |
|
59 | - */ |
|
60 | - public function getName() { |
|
61 | - return $this->name; |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * @param int $priority |
|
66 | - */ |
|
67 | - public function setPriority($priority) { |
|
68 | - $this->priority = $priority; |
|
69 | - } |
|
70 | - |
|
71 | - /** |
|
72 | - * @return int |
|
73 | - */ |
|
74 | - public function getPriority() { |
|
75 | - return $this->priority; |
|
76 | - } |
|
77 | - |
|
78 | - /** |
|
79 | - * @param string $href |
|
80 | - */ |
|
81 | - public function setHref($href) { |
|
82 | - $this->href = $href; |
|
83 | - } |
|
84 | - |
|
85 | - /** |
|
86 | - * @return string |
|
87 | - */ |
|
88 | - public function getHref() { |
|
89 | - return $this->href; |
|
90 | - } |
|
91 | - |
|
92 | - /** |
|
93 | - * @return array |
|
94 | - */ |
|
95 | - public function jsonSerialize() { |
|
96 | - return [ |
|
97 | - 'title' => $this->name, |
|
98 | - 'icon' => $this->icon, |
|
99 | - 'hyperlink' => $this->href, |
|
100 | - ]; |
|
101 | - } |
|
31 | + /** @var string */ |
|
32 | + private $icon; |
|
33 | + |
|
34 | + /** @var string */ |
|
35 | + private $name; |
|
36 | + |
|
37 | + /** @var string */ |
|
38 | + private $href; |
|
39 | + |
|
40 | + /** @var int */ |
|
41 | + private $priority = 10; |
|
42 | + |
|
43 | + /** |
|
44 | + * @param string $icon absolute URI to an icon |
|
45 | + */ |
|
46 | + public function setIcon($icon) { |
|
47 | + $this->icon = $icon; |
|
48 | + } |
|
49 | + |
|
50 | + /** |
|
51 | + * @param string $name |
|
52 | + */ |
|
53 | + public function setName($name) { |
|
54 | + $this->name = $name; |
|
55 | + } |
|
56 | + |
|
57 | + /** |
|
58 | + * @return string |
|
59 | + */ |
|
60 | + public function getName() { |
|
61 | + return $this->name; |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * @param int $priority |
|
66 | + */ |
|
67 | + public function setPriority($priority) { |
|
68 | + $this->priority = $priority; |
|
69 | + } |
|
70 | + |
|
71 | + /** |
|
72 | + * @return int |
|
73 | + */ |
|
74 | + public function getPriority() { |
|
75 | + return $this->priority; |
|
76 | + } |
|
77 | + |
|
78 | + /** |
|
79 | + * @param string $href |
|
80 | + */ |
|
81 | + public function setHref($href) { |
|
82 | + $this->href = $href; |
|
83 | + } |
|
84 | + |
|
85 | + /** |
|
86 | + * @return string |
|
87 | + */ |
|
88 | + public function getHref() { |
|
89 | + return $this->href; |
|
90 | + } |
|
91 | + |
|
92 | + /** |
|
93 | + * @return array |
|
94 | + */ |
|
95 | + public function jsonSerialize() { |
|
96 | + return [ |
|
97 | + 'title' => $this->name, |
|
98 | + 'icon' => $this->icon, |
|
99 | + 'hyperlink' => $this->href, |
|
100 | + ]; |
|
101 | + } |
|
102 | 102 | |
103 | 103 | } |
@@ -33,33 +33,33 @@ |
||
33 | 33 | */ |
34 | 34 | interface IAction extends JsonSerializable { |
35 | 35 | |
36 | - /** |
|
37 | - * @param string $icon absolute URI to an icon |
|
38 | - * @since 12.0 |
|
39 | - */ |
|
40 | - public function setIcon($icon); |
|
36 | + /** |
|
37 | + * @param string $icon absolute URI to an icon |
|
38 | + * @since 12.0 |
|
39 | + */ |
|
40 | + public function setIcon($icon); |
|
41 | 41 | |
42 | - /** |
|
43 | - * @return string localized action name, e.g. 'Call' |
|
44 | - * @since 12.0 |
|
45 | - */ |
|
46 | - public function getName(); |
|
42 | + /** |
|
43 | + * @return string localized action name, e.g. 'Call' |
|
44 | + * @since 12.0 |
|
45 | + */ |
|
46 | + public function getName(); |
|
47 | 47 | |
48 | - /** |
|
49 | - * @param string $name localized action name, e.g. 'Call' |
|
50 | - * @since 12.0 |
|
51 | - */ |
|
52 | - public function setName($name); |
|
48 | + /** |
|
49 | + * @param string $name localized action name, e.g. 'Call' |
|
50 | + * @since 12.0 |
|
51 | + */ |
|
52 | + public function setName($name); |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param int $priority priorize actions, high order ones are shown on top |
|
56 | - * @since 12.0 |
|
57 | - */ |
|
58 | - public function setPriority($priority); |
|
54 | + /** |
|
55 | + * @param int $priority priorize actions, high order ones are shown on top |
|
56 | + * @since 12.0 |
|
57 | + */ |
|
58 | + public function setPriority($priority); |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return int priority to priorize actions, high order ones are shown on top |
|
62 | - * @since 12.0 |
|
63 | - */ |
|
64 | - public function getPriority(); |
|
60 | + /** |
|
61 | + * @return int priority to priorize actions, high order ones are shown on top |
|
62 | + * @since 12.0 |
|
63 | + */ |
|
64 | + public function getPriority(); |
|
65 | 65 | } |
@@ -28,27 +28,27 @@ |
||
28 | 28 | */ |
29 | 29 | interface IActionFactory { |
30 | 30 | |
31 | - /** |
|
32 | - * Construct and return a new link action for the contacts menu |
|
33 | - * |
|
34 | - * @since 12.0 |
|
35 | - * |
|
36 | - * @param string $icon full path to the action's icon |
|
37 | - * @param string $name localized name of the action |
|
38 | - * @param string $href target URL |
|
39 | - * @return ILinkAction |
|
40 | - */ |
|
41 | - public function newLinkAction($icon, $name, $href); |
|
31 | + /** |
|
32 | + * Construct and return a new link action for the contacts menu |
|
33 | + * |
|
34 | + * @since 12.0 |
|
35 | + * |
|
36 | + * @param string $icon full path to the action's icon |
|
37 | + * @param string $name localized name of the action |
|
38 | + * @param string $href target URL |
|
39 | + * @return ILinkAction |
|
40 | + */ |
|
41 | + public function newLinkAction($icon, $name, $href); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Construct and return a new email action for the contacts menu |
|
45 | - * |
|
46 | - * @since 12.0 |
|
47 | - * |
|
48 | - * @param string $icon full path to the action's icon |
|
49 | - * @param string $name localized name of the action |
|
50 | - * @param string $email target e-mail address |
|
51 | - * @return ILinkAction |
|
52 | - */ |
|
53 | - public function newEMailAction($icon, $name, $email); |
|
43 | + /** |
|
44 | + * Construct and return a new email action for the contacts menu |
|
45 | + * |
|
46 | + * @since 12.0 |
|
47 | + * |
|
48 | + * @param string $icon full path to the action's icon |
|
49 | + * @param string $name localized name of the action |
|
50 | + * @param string $email target e-mail address |
|
51 | + * @return ILinkAction |
|
52 | + */ |
|
53 | + public function newEMailAction($icon, $name, $email); |
|
54 | 54 | } |
@@ -29,15 +29,15 @@ |
||
29 | 29 | */ |
30 | 30 | interface ILinkAction extends IAction { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 12.0 |
|
34 | - * @param string $href the target URL of the action |
|
35 | - */ |
|
36 | - public function setHref($href); |
|
32 | + /** |
|
33 | + * @since 12.0 |
|
34 | + * @param string $href the target URL of the action |
|
35 | + */ |
|
36 | + public function setHref($href); |
|
37 | 37 | |
38 | - /** |
|
39 | - * @since 12.0 |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getHref(); |
|
38 | + /** |
|
39 | + * @since 12.0 |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getHref(); |
|
43 | 43 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | use OC\DB\QueryBuilder\QueryFunction; |
25 | 25 | |
26 | 26 | class OCIFunctionBuilder extends FunctionBuilder { |
27 | - public function md5($input) { |
|
28 | - return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
29 | - } |
|
27 | + public function md5($input) { |
|
28 | + return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
29 | + } |
|
30 | 30 | } |
@@ -25,6 +25,6 @@ |
||
25 | 25 | |
26 | 26 | class OCIFunctionBuilder extends FunctionBuilder { |
27 | 27 | public function md5($input) { |
28 | - return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw(' . $this->helper->quoteColumnName($input) .')))'); |
|
28 | + return new QueryFunction('LOWER(DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('.$this->helper->quoteColumnName($input).')))'); |
|
29 | 29 | } |
30 | 30 | } |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | |
43 | 43 | public function fixupStatement($statement) { |
44 | 44 | $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
45 | - $statement = str_replace( '`', '"', $statement ); |
|
46 | - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
45 | + $statement = str_replace('`', '"', $statement); |
|
46 | + $statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement); |
|
47 | 47 | $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
48 | - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
48 | + $statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement); |
|
49 | 49 | return $statement; |
50 | 50 | } |
51 | 51 | |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | if (empty($compare)) { |
65 | 65 | $compare = array_keys($input); |
66 | 66 | } |
67 | - $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
67 | + $fieldList = '`'.implode('`,`', array_keys($input)).'`'; |
|
68 | 68 | $query = "INSERT INTO `$table` ($fieldList) SELECT " |
69 | - . str_repeat('?,', count($input)-1).'? ' |
|
69 | + . str_repeat('?,', count($input) - 1).'? ' |
|
70 | 70 | . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
71 | 71 | |
72 | 72 | $inserts = array_values($input); |
73 | - foreach($compare as $key) { |
|
74 | - $query .= '`' . $key . '`'; |
|
73 | + foreach ($compare as $key) { |
|
74 | + $query .= '`'.$key.'`'; |
|
75 | 75 | if (is_null($input[$key])) { |
76 | 76 | $query .= ' IS NULL AND '; |
77 | 77 | } else { |
@@ -31,70 +31,70 @@ |
||
31 | 31 | |
32 | 32 | class AdapterSqlite extends Adapter { |
33 | 33 | |
34 | - /** |
|
35 | - * @param string $tableName |
|
36 | - */ |
|
37 | - public function lockTable($tableName) { |
|
38 | - $this->conn->executeUpdate('BEGIN EXCLUSIVE TRANSACTION'); |
|
39 | - } |
|
34 | + /** |
|
35 | + * @param string $tableName |
|
36 | + */ |
|
37 | + public function lockTable($tableName) { |
|
38 | + $this->conn->executeUpdate('BEGIN EXCLUSIVE TRANSACTION'); |
|
39 | + } |
|
40 | 40 | |
41 | - public function unlockTable() { |
|
42 | - $this->conn->executeUpdate('COMMIT TRANSACTION'); |
|
43 | - } |
|
41 | + public function unlockTable() { |
|
42 | + $this->conn->executeUpdate('COMMIT TRANSACTION'); |
|
43 | + } |
|
44 | 44 | |
45 | - public function fixupStatement($statement) { |
|
46 | - $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
|
47 | - $statement = str_replace( '`', '"', $statement ); |
|
48 | - $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
49 | - $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
|
50 | - $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
51 | - return $statement; |
|
52 | - } |
|
45 | + public function fixupStatement($statement) { |
|
46 | + $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); |
|
47 | + $statement = str_replace( '`', '"', $statement ); |
|
48 | + $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |
|
49 | + $statement = str_ireplace('GREATEST(', 'MAX(', $statement); |
|
50 | + $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement ); |
|
51 | + return $statement; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Insert a row if the matching row does not exists. To accomplish proper race condition avoidance |
|
56 | - * it is needed that there is also a unique constraint on the values. Then this method will |
|
57 | - * catch the exception and return 0. |
|
58 | - * |
|
59 | - * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
60 | - * @param array $input data that should be inserted into the table (column name => value) |
|
61 | - * @param array|null $compare List of values that should be checked for "if not exists" |
|
62 | - * If this is null or an empty array, all keys of $input will be compared |
|
63 | - * Please note: text fields (clob) must not be used in the compare array |
|
64 | - * @return int number of inserted rows |
|
65 | - * @throws \Doctrine\DBAL\DBALException |
|
66 | - * @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371 |
|
67 | - */ |
|
68 | - public function insertIfNotExist($table, $input, array $compare = null) { |
|
69 | - if (empty($compare)) { |
|
70 | - $compare = array_keys($input); |
|
71 | - } |
|
72 | - $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
73 | - $query = "INSERT INTO `$table` ($fieldList) SELECT " |
|
74 | - . str_repeat('?,', count($input)-1).'? ' |
|
75 | - . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
|
54 | + /** |
|
55 | + * Insert a row if the matching row does not exists. To accomplish proper race condition avoidance |
|
56 | + * it is needed that there is also a unique constraint on the values. Then this method will |
|
57 | + * catch the exception and return 0. |
|
58 | + * |
|
59 | + * @param string $table The table name (will replace *PREFIX* with the actual prefix) |
|
60 | + * @param array $input data that should be inserted into the table (column name => value) |
|
61 | + * @param array|null $compare List of values that should be checked for "if not exists" |
|
62 | + * If this is null or an empty array, all keys of $input will be compared |
|
63 | + * Please note: text fields (clob) must not be used in the compare array |
|
64 | + * @return int number of inserted rows |
|
65 | + * @throws \Doctrine\DBAL\DBALException |
|
66 | + * @deprecated 15.0.0 - use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) {}" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371 |
|
67 | + */ |
|
68 | + public function insertIfNotExist($table, $input, array $compare = null) { |
|
69 | + if (empty($compare)) { |
|
70 | + $compare = array_keys($input); |
|
71 | + } |
|
72 | + $fieldList = '`' . implode('`,`', array_keys($input)) . '`'; |
|
73 | + $query = "INSERT INTO `$table` ($fieldList) SELECT " |
|
74 | + . str_repeat('?,', count($input)-1).'? ' |
|
75 | + . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE "; |
|
76 | 76 | |
77 | - $inserts = array_values($input); |
|
78 | - foreach($compare as $key) { |
|
79 | - $query .= '`' . $key . '`'; |
|
80 | - if (is_null($input[$key])) { |
|
81 | - $query .= ' IS NULL AND '; |
|
82 | - } else { |
|
83 | - $inserts[] = $input[$key]; |
|
84 | - $query .= ' = ? AND '; |
|
85 | - } |
|
86 | - } |
|
87 | - $query = substr($query, 0, -5); |
|
88 | - $query .= ')'; |
|
77 | + $inserts = array_values($input); |
|
78 | + foreach($compare as $key) { |
|
79 | + $query .= '`' . $key . '`'; |
|
80 | + if (is_null($input[$key])) { |
|
81 | + $query .= ' IS NULL AND '; |
|
82 | + } else { |
|
83 | + $inserts[] = $input[$key]; |
|
84 | + $query .= ' = ? AND '; |
|
85 | + } |
|
86 | + } |
|
87 | + $query = substr($query, 0, -5); |
|
88 | + $query .= ')'; |
|
89 | 89 | |
90 | - try { |
|
91 | - return $this->conn->executeUpdate($query, $inserts); |
|
92 | - } catch (UniqueConstraintViolationException $e) { |
|
93 | - // if this is thrown then a concurrent insert happened between the insert and the sub-select in the insert, that should have avoided it |
|
94 | - // it's fine to ignore this then |
|
95 | - // |
|
96 | - // more discussions about this can be found at https://github.com/nextcloud/server/pull/12315 |
|
97 | - return 0; |
|
98 | - } |
|
99 | - } |
|
90 | + try { |
|
91 | + return $this->conn->executeUpdate($query, $inserts); |
|
92 | + } catch (UniqueConstraintViolationException $e) { |
|
93 | + // if this is thrown then a concurrent insert happened between the insert and the sub-select in the insert, that should have avoided it |
|
94 | + // it's fine to ignore this then |
|
95 | + // |
|
96 | + // more discussions about this can be found at https://github.com/nextcloud/server/pull/12315 |
|
97 | + return 0; |
|
98 | + } |
|
99 | + } |
|
100 | 100 | } |
@@ -25,22 +25,22 @@ |
||
25 | 25 | * @since 12.0.0 |
26 | 26 | */ |
27 | 27 | interface ISearchOrder { |
28 | - const DIRECTION_ASCENDING = 'asc'; |
|
29 | - const DIRECTION_DESCENDING = 'desc'; |
|
28 | + const DIRECTION_ASCENDING = 'asc'; |
|
29 | + const DIRECTION_DESCENDING = 'desc'; |
|
30 | 30 | |
31 | - /** |
|
32 | - * The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING |
|
33 | - * |
|
34 | - * @return string |
|
35 | - * @since 12.0.0 |
|
36 | - */ |
|
37 | - public function getDirection(); |
|
31 | + /** |
|
32 | + * The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING |
|
33 | + * |
|
34 | + * @return string |
|
35 | + * @since 12.0.0 |
|
36 | + */ |
|
37 | + public function getDirection(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * The field to sort on |
|
41 | - * |
|
42 | - * @return string |
|
43 | - * @since 12.0.0 |
|
44 | - */ |
|
45 | - public function getField(); |
|
39 | + /** |
|
40 | + * The field to sort on |
|
41 | + * |
|
42 | + * @return string |
|
43 | + * @since 12.0.0 |
|
44 | + */ |
|
45 | + public function getField(); |
|
46 | 46 | } |
@@ -25,36 +25,36 @@ |
||
25 | 25 | * @since 12.0.0 |
26 | 26 | */ |
27 | 27 | interface ISearchComparison extends ISearchOperator { |
28 | - const COMPARE_EQUAL = 'eq'; |
|
29 | - const COMPARE_GREATER_THAN = 'gt'; |
|
30 | - const COMPARE_GREATER_THAN_EQUAL = 'gte'; |
|
31 | - const COMPARE_LESS_THAN = 'lt'; |
|
32 | - const COMPARE_LESS_THAN_EQUAL = 'lte'; |
|
33 | - const COMPARE_LIKE = 'like'; |
|
28 | + const COMPARE_EQUAL = 'eq'; |
|
29 | + const COMPARE_GREATER_THAN = 'gt'; |
|
30 | + const COMPARE_GREATER_THAN_EQUAL = 'gte'; |
|
31 | + const COMPARE_LESS_THAN = 'lt'; |
|
32 | + const COMPARE_LESS_THAN_EQUAL = 'lte'; |
|
33 | + const COMPARE_LIKE = 'like'; |
|
34 | 34 | |
35 | - /** |
|
36 | - * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants |
|
37 | - * |
|
38 | - * @return string |
|
39 | - * @since 12.0.0 |
|
40 | - */ |
|
41 | - public function getType(); |
|
35 | + /** |
|
36 | + * Get the type of comparison, one of the ISearchComparison::COMPARE_* constants |
|
37 | + * |
|
38 | + * @return string |
|
39 | + * @since 12.0.0 |
|
40 | + */ |
|
41 | + public function getType(); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get the name of the field to compare with |
|
45 | - * |
|
46 | - * i.e. 'size', 'name' or 'mimetype' |
|
47 | - * |
|
48 | - * @return string |
|
49 | - * @since 12.0.0 |
|
50 | - */ |
|
51 | - public function getField(); |
|
43 | + /** |
|
44 | + * Get the name of the field to compare with |
|
45 | + * |
|
46 | + * i.e. 'size', 'name' or 'mimetype' |
|
47 | + * |
|
48 | + * @return string |
|
49 | + * @since 12.0.0 |
|
50 | + */ |
|
51 | + public function getField(); |
|
52 | 52 | |
53 | - /** |
|
54 | - * Get the value to compare the field with |
|
55 | - * |
|
56 | - * @return string|integer|\DateTime |
|
57 | - * @since 12.0.0 |
|
58 | - */ |
|
59 | - public function getValue(); |
|
53 | + /** |
|
54 | + * Get the value to compare the field with |
|
55 | + * |
|
56 | + * @return string|integer|\DateTime |
|
57 | + * @since 12.0.0 |
|
58 | + */ |
|
59 | + public function getValue(); |
|
60 | 60 | } |