diff --git a/CHANGELOG.md b/CHANGELOG.md index b27c70c5201..5f12e189a89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ changes in the following format: PR #1234*** ## LORIS 25.0 (Release Date: ????-??-??) ### Core #### Features -- placeholder +- Added new interface intended to be used for querying module data from PHP (PR #8215) #### Updates and Improvements - Rename subproject to Cohort (PR #7817) @@ -77,7 +77,6 @@ changes in the following format: PR #1234*** #### API - Ability to use PSCID instead of the CandID in the candidates API (PR #8138) - ## LORIS 24.0 (Release Date: 2022-03-24) ### Core #### Features diff --git a/src/Data/Query/Criteria.php b/src/Data/Query/Criteria.php new file mode 100644 index 00000000000..b48080b6bd3 --- /dev/null +++ b/src/Data/Query/Criteria.php @@ -0,0 +1,17 @@ +suffix; + } +} diff --git a/src/Data/Query/Criteria/Equal.php b/src/Data/Query/Criteria/Equal.php new file mode 100644 index 00000000000..e041db4e32f --- /dev/null +++ b/src/Data/Query/Criteria/Equal.php @@ -0,0 +1,28 @@ +value; + } +} diff --git a/src/Data/Query/Criteria/GreaterThan.php b/src/Data/Query/Criteria/GreaterThan.php new file mode 100644 index 00000000000..d9c02b6fd65 --- /dev/null +++ b/src/Data/Query/Criteria/GreaterThan.php @@ -0,0 +1,26 @@ + a given value. + */ +class GreaterThan implements Criteria +{ + /** + * Construct a GreaterThan comparison + */ + public function __construct(protected $value) + { + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + return $this->value; + } +} diff --git a/src/Data/Query/Criteria/GreaterThanOrEqual.php b/src/Data/Query/Criteria/GreaterThanOrEqual.php new file mode 100644 index 00000000000..a53ee2df13e --- /dev/null +++ b/src/Data/Query/Criteria/GreaterThanOrEqual.php @@ -0,0 +1,26 @@ += a given value. + */ +class GreaterThanOrEqual implements Criteria +{ + /** + * Constructor + */ + public function __construct(protected $value) + { + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + return $this->value; + } +} diff --git a/src/Data/Query/Criteria/In.php b/src/Data/Query/Criteria/In.php new file mode 100644 index 00000000000..a1c8286e871 --- /dev/null +++ b/src/Data/Query/Criteria/In.php @@ -0,0 +1,30 @@ +val = $val; + } + + /** + * {@inheritDoc} + */ + public function getValue() + { + return $this->val; + } +} diff --git a/src/Data/Query/Criteria/IsNull.php b/src/Data/Query/Criteria/IsNull.php new file mode 100644 index 00000000000..27cf14c521d --- /dev/null +++ b/src/Data/Query/Criteria/IsNull.php @@ -0,0 +1,24 @@ +value; + } +} diff --git a/src/Data/Query/Criteria/LessThanOrEqual.php b/src/Data/Query/Criteria/LessThanOrEqual.php new file mode 100644 index 00000000000..7d5686773db --- /dev/null +++ b/src/Data/Query/Criteria/LessThanOrEqual.php @@ -0,0 +1,27 @@ +value; + } +} diff --git a/src/Data/Query/Criteria/NotEqual.php b/src/Data/Query/Criteria/NotEqual.php new file mode 100644 index 00000000000..3665b3e4571 --- /dev/null +++ b/src/Data/Query/Criteria/NotEqual.php @@ -0,0 +1,27 @@ +value; + } +} diff --git a/src/Data/Query/Criteria/NotNull.php b/src/Data/Query/Criteria/NotNull.php new file mode 100644 index 00000000000..07582513ad7 --- /dev/null +++ b/src/Data/Query/Criteria/NotNull.php @@ -0,0 +1,25 @@ +prefix; + } +} diff --git a/src/Data/Query/Criteria/Substring.php b/src/Data/Query/Criteria/Substring.php new file mode 100644 index 00000000000..db63dc171da --- /dev/null +++ b/src/Data/Query/Criteria/Substring.php @@ -0,0 +1,28 @@ +substr; + } +} diff --git a/src/Data/Query/QueryEngine.php b/src/Data/Query/QueryEngine.php new file mode 100644 index 00000000000..deb02282a59 --- /dev/null +++ b/src/Data/Query/QueryEngine.php @@ -0,0 +1,64 @@ +