diff --git a/.idea/php.xml b/.idea/php.xml index d5e9721..f162a2c 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -56,6 +56,10 @@ + + + + diff --git a/.idea/wordpress-interface.iml b/.idea/wordpress-interface.iml index ea0aed4..4dc58d5 100644 --- a/.idea/wordpress-interface.iml +++ b/.idea/wordpress-interface.iml @@ -60,6 +60,10 @@ + + + + diff --git a/composer.json b/composer.json index 114136c..e3bb666 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,13 @@ "require": { "php": "^7.1 | ^8.0", "dhii/package-interface": "^0.1-alpha3", - "dhii/human-readable-interface": "^0.2.0-alpha1" + "dhii/human-readable-interface": "^0.2.0-alpha1", + "dhii/data-key-value-aware-interface": "^0.2", + "dhii/data-identifiable-interface": "^0.1", + "dhii/collections-interface": "^0.3-alpha4", + "psr/http-message": "^1.0", + "psr/container": "^1.0 | ^2.0", + "symfony/polyfill-php80": "^1.19" }, "require-dev": { "phpunit/phpunit": "^7.0 | ^8.0 | ^9.0", diff --git a/composer.lock b/composer.lock index 8858861..661055b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,169 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e116cda9dc45826575cbd30d4813241d", + "content-hash": "fe785150e2bf54e04c948c9ec7503f36", "packages": [ + { + "name": "dhii/collections-interface", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/Dhii/collections-interface.git", + "reference": "da334f75f6477ef7eecaf28df1d5253fe05684ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dhii/collections-interface/zipball/da334f75f6477ef7eecaf28df1d5253fe05684ee", + "reference": "da334f75f6477ef7eecaf28df1d5253fe05684ee", + "shasum": "" + }, + "require": { + "php": "^7.1 | ^8.0", + "psr/container": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 | ^8.0 | ^9.0", + "slevomat/coding-standard": "^6.0", + "vimeo/psalm": "^3.11.7 | ^4.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dhii\\Collection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dhii Team", + "email": "development@dhii.co" + }, + { + "name": "Anton Ukhanev", + "email": "xedin.unknown@gmail.com" + } + ], + "description": "A highly ISP-compliant collection of interfaces that represent maps and lists.", + "support": { + "issues": "https://github.com/Dhii/collections-interface/issues", + "source": "https://github.com/Dhii/collections-interface/tree/v0.3.0-alpha4" + }, + "time": "2021-03-09T17:36:34+00:00" + }, + { + "name": "dhii/data-identifiable-interface", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/Dhii/data-identifiable-interface.git", + "reference": "ee063fd2827d9de9e6f92c5abeb759c4f52f5558" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dhii/data-identifiable-interface/zipball/ee063fd2827d9de9e6f92c5abeb759c4f52f5558", + "reference": "ee063fd2827d9de9e6f92c5abeb759c4f52f5558", + "shasum": "" + }, + "require": { + "php": "^5.3 | ^7.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "<=0.3.2", + "dhii/php-cs-fixer-config": "dev-php-5.3", + "phpunit/phpunit": "^4.8", + "ptrofimov/xpmock": "^1.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dhii\\Data\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dhii Team", + "email": "development@dhii.co" + } + ], + "description": "Interfaces for objects that are identifiable.", + "support": { + "issues": "https://github.com/Dhii/data-identifiable-interface/issues", + "source": "https://github.com/Dhii/data-identifiable-interface/tree/v0.1.1-alpha1" + }, + "time": "2018-05-10T15:15:49+00:00" + }, + { + "name": "dhii/data-key-value-aware-interface", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/Dhii/data-key-value-aware-interface.git", + "reference": "f73fcb07995c48db61b1ffb4bfa01bb98b5e9c00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dhii/data-key-value-aware-interface/zipball/f73fcb07995c48db61b1ffb4bfa01bb98b5e9c00", + "reference": "f73fcb07995c48db61b1ffb4bfa01bb98b5e9c00", + "shasum": "" + }, + "require": { + "php": "^5.3 | ^7.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "<=0.3.2", + "dhii/php-cs-fixer-config": "dev-php-5.3", + "dhii/stringable-interface": "^0.1", + "phpunit/phpunit": "4.*", + "ptrofimov/xpmock": "^1.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dhii\\Data\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dhii Team", + "email": "development@dhii.co" + } + ], + "description": "Interfaces that aim to increase interoperability of value objects", + "support": { + "issues": "https://github.com/Dhii/data-key-value-aware-interface/issues", + "source": "https://github.com/Dhii/data-key-value-aware-interface/tree/v0.2-alpha2" + }, + "time": "2018-02-11T12:52:01+00:00" + }, { "name": "dhii/human-readable-interface", "version": "0.2.x-dev", @@ -221,6 +382,113 @@ }, "time": "2021-01-14T16:19:20+00:00" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", + "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2019-08-29T13:16:46+00:00" + }, { "name": "symfony/polyfill-php80", "version": "dev-main", @@ -403,12 +671,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a" + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f813a658f0446192c5e17f96727070ee9342b93a", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", "shasum": "" }, "require": { @@ -473,7 +741,7 @@ "type": "github" } ], - "time": "2020-08-30T19:23:04+00:00" + "time": "2021-04-05T20:23:22+00:00" }, { "name": "composer/package-versions-deprecated", @@ -633,16 +901,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.5", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f28d44c286812c714741478d968104c5e604a1d4" + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", - "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/31d57697eb1971712a08031cfaff5a846d10bdf5", + "reference": "31d57697eb1971712a08031cfaff5a846d10bdf5", "shasum": "" }, "require": { @@ -650,7 +918,8 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -676,7 +945,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.0" }, "funding": [ { @@ -692,7 +961,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T08:04:11+00:00" + "time": "2021-04-09T19:40:06+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -1527,16 +1796,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.4.12", + "version": "0.5.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "2e17e4a90702d8b7ead58f4e08478a8e819ba6b8" + "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/2e17e4a90702d8b7ead58f4e08478a8e819ba6b8", - "reference": "2e17e4a90702d8b7ead58f4e08478a8e819ba6b8", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/e352d065af1ae9b41c12d1dfd309e90f7b1f55c9", + "reference": "e352d065af1ae9b41c12d1dfd309e90f7b1f55c9", "shasum": "" }, "require": { @@ -1554,7 +1823,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "0.5-dev" } }, "autoload": { @@ -1571,9 +1840,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/0.4.12" + "source": "https://github.com/phpstan/phpdoc-parser/tree/0.5.4" }, - "time": "2021-02-28T14:30:10+00:00" + "time": "2021-04-03T14:46:19+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1954,59 +2223,6 @@ }, "time": "2020-01-08T08:45:45+00:00" }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" - }, - "time": "2017-02-14T16:28:37+00:00" - }, { "name": "psr/log", "version": "dev-master", @@ -2728,28 +2944,28 @@ "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "a3e37268f8ed9f1cd2f74b876996cb2e91f3e1c4" + "reference": "6783711e13ab355e0c872567e0a72a22c71c7b02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/a3e37268f8ed9f1cd2f74b876996cb2e91f3e1c4", - "reference": "a3e37268f8ed9f1cd2f74b876996cb2e91f3e1c4", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/6783711e13ab355e0c872567e0a72a22c71c7b02", + "reference": "6783711e13ab355e0c872567e0a72a22c71c7b02", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.12", - "squizlabs/php_codesniffer": "dev-master" + "phpstan/phpdoc-parser": "0.5.1 - 0.5.4", + "squizlabs/php_codesniffer": "^3.6.0" }, "require-dev": { "phing/phing": "2.16.4", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.80", + "php-parallel-lint/php-parallel-lint": "1.3.0", + "phpstan/phpstan": "0.12.83", "phpstan/phpstan-deprecation-rules": "0.12.6", - "phpstan/phpstan-phpunit": "0.12.17", + "phpstan/phpstan-phpunit": "0.12.18", "phpstan/phpstan-strict-rules": "0.12.9", - "phpunit/phpunit": "7.5.20|8.5.5|9.5.2" + "phpunit/phpunit": "7.5.20|8.5.5|9.5.4" }, "default-branch": true, "type": "phpcodesniffer-standard", @@ -2782,7 +2998,7 @@ "type": "tidelift" } ], - "time": "2021-03-04T08:19:17+00:00" + "time": "2021-04-16T18:02:24+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2790,12 +3006,12 @@ "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d02296fe420483999d2ad8cd8bdceb43014dc83e" + "reference": "342dbf2481b7a3c0b799fecd7b7c4def3c0408e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d02296fe420483999d2ad8cd8bdceb43014dc83e", - "reference": "d02296fe420483999d2ad8cd8bdceb43014dc83e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/342dbf2481b7a3c0b799fecd7b7c4def3c0408e3", + "reference": "342dbf2481b7a3c0b799fecd7b7c4def3c0408e3", "shasum": "" }, "require": { @@ -2839,7 +3055,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-03-05T07:46:22+00:00" + "time": "2021-04-16T04:22:12+00:00" }, { "name": "symfony/console", @@ -2847,12 +3063,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c98349bda966c70d6c08b4cd8658377c94166492" + "reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c98349bda966c70d6c08b4cd8658377c94166492", - "reference": "c98349bda966c70d6c08b4cd8658377c94166492", + "url": "https://api.github.com/repos/symfony/console/zipball/36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625", + "reference": "36bbd079b69b94bcc9c9c9e1e37ca3b1e7971625", "shasum": "" }, "require": { @@ -2928,7 +3144,7 @@ "type": "tidelift" } ], - "time": "2021-02-22T18:44:15+00:00" + "time": "2021-04-16T17:32:19+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3300,20 +3516,20 @@ "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "96e0743892f3239f089b13eb978c33d743cfe904" + "reference": "ee778e9246ac33451a0f582d60a602288e687f98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/96e0743892f3239f089b13eb978c33d743cfe904", - "reference": "96e0743892f3239f089b13eb978c33d743cfe904", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/ee778e9246ac33451a0f582d60a602288e687f98", + "reference": "ee778e9246ac33451a0f582d60a602288e687f98", "shasum": "" }, "require": { - "amphp/amp": "^2.1", + "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1", + "composer/xdebug-handler": "^1.1 || ^2.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-dom": "*", "ext-json": "*", @@ -3335,7 +3551,6 @@ "psalm/psalm": "self.version" }, "require-dev": { - "amphp/amp": "^2.4.2", "bamarni/composer-bin-plugin": "^1.2", "brianium/paratest": "^4.0||^6.0", "ext-curl": "*", @@ -3348,6 +3563,7 @@ "slevomat/coding-standard": "^6.3.11", "squizlabs/php_codesniffer": "^3.5", "symfony/process": "^4.3", + "weirdan/phpunit-appveyor-reporter": "^1.0.0", "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { @@ -3398,7 +3614,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm/tree/master" }, - "time": "2021-03-05T05:39:25+00:00" + "time": "2021-04-16T20:07:47+00:00" }, { "name": "webmozart/assert", diff --git a/src/Acl/CapableUserInterface.php b/src/Acl/CapableUserInterface.php new file mode 100644 index 0000000..6c45117 --- /dev/null +++ b/src/Acl/CapableUserInterface.php @@ -0,0 +1,13 @@ + + */ + public function getPrivileges(): iterable; + + public function isAllowed(string $resourceKey, string $capability): bool; +} diff --git a/src/Entity/EntityInterface.php b/src/Entity/EntityInterface.php new file mode 100644 index 0000000..5c51f3c --- /dev/null +++ b/src/Entity/EntityInterface.php @@ -0,0 +1,20 @@ + $termIds + * @return static + */ + public function withIdIn(iterable $termIds): TermQueryInterface; + + /** + * @param iterable $termIds + * @return static + */ + public function withIdNotIn(iterable $termIds): TermQueryInterface; + + /** + * @return static + */ + public function withMeta(MetaQueryInterface $query): self; +} diff --git a/src/Entity/EntityQueryResultInterface.php b/src/Entity/EntityQueryResultInterface.php new file mode 100644 index 0000000..b9d6666 --- /dev/null +++ b/src/Entity/EntityQueryResultInterface.php @@ -0,0 +1,20 @@ + + */ +interface EntityQueryResultInterface extends QueryResultInterface +{ + /** + * @return iterable + */ + public function getIds(): iterable; +} diff --git a/src/Meta/MetaInterface.php b/src/Meta/MetaInterface.php new file mode 100644 index 0000000..8847cb5 --- /dev/null +++ b/src/Meta/MetaInterface.php @@ -0,0 +1,13 @@ + + */ + public function getUrlsToPing(): iterable; + + /** + * @return iterable + */ + public function getUrlsPinged(): iterable; + + public function getGuid(): string; + + public function getMenuOrder(): int; + + public function getType(): string; + + public function getMimeType(): string; +} diff --git a/src/Post/PostQueryInterface.php b/src/Post/PostQueryInterface.php new file mode 100644 index 0000000..e039a22 --- /dev/null +++ b/src/Post/PostQueryInterface.php @@ -0,0 +1,33 @@ + + */ +interface PostQueryResultInterface extends EntityQueryResultInterface +{ +} diff --git a/src/Query/ClauseQueryInterface.php b/src/Query/ClauseQueryInterface.php new file mode 100644 index 0000000..4ebb387 --- /dev/null +++ b/src/Query/ClauseQueryInterface.php @@ -0,0 +1,13 @@ + $values + * @return static + */ + public function withIn(string $key, iterable $values): self; + + /** + * @param iterable $values + * @return static + */ + public function withNotIn(string $key, iterable $values): self; + + /** + * @param numeric|string|DateTimeInterface $lowerBound + * @param numeric|string|DateTimeInterface $upperBound + * @return static + */ + public function withBetween(string $key, $lowerBound, $upperBound): self; + + /** + * @param numeric|string|DateTimeInterface $lowerBound + * @param numeric|string|DateTimeInterface $upperBound + * @return static + */ + public function withNotBetween(string $key, $lowerBound, $upperBound): self; + + /** + * @return static + */ + public function withRegexp(string $key, string $regexp): self; + + /** + * @return static + */ + public function withNotRegexp(string $key, string $regexp): self; + + /** + * @param self $query The query to add a relationship with. + * @return static + */ + public function withQuery(QueryConfiguratorInterface $query): self; + + /** + * @param self::RELATION_TYPE_* $relation + * @return static + */ + public function withRelation(string $relation): self; +} diff --git a/src/Query/QueryInterface.php b/src/Query/QueryInterface.php new file mode 100644 index 0000000..a906f73 --- /dev/null +++ b/src/Query/QueryInterface.php @@ -0,0 +1,23 @@ + + */ +interface QueryResultInterface extends Traversable, CountableListInterface +{ + /** + * The total number of items found on all pages. + * + */ + public function getTotalCount(): int; +} diff --git a/src/Query/RecordQueryConfiguratorInterface.php b/src/Query/RecordQueryConfiguratorInterface.php new file mode 100644 index 0000000..bf07f8b --- /dev/null +++ b/src/Query/RecordQueryConfiguratorInterface.php @@ -0,0 +1,23 @@ + $taxonomyKeys + * @return static + */ + public function withTaxonomyIn(iterable $taxonomyKeys): TermQueryInterface; + + /** + * @param iterable $objectIds + * @return static + */ + public function withObjectIdIn(iterable $objectIds): TermQueryInterface; + + /** + * @param iterable $objectIds + * @return static + */ + public function withObjectIdNotIn(iterable $objectIds): TermQueryInterface; + + /** + * @param iterable $termIds + * @return static + */ + public function withIdNotInTreesOf(iterable $termIds): TermQueryInterface; + + /** + * @param iterable $keys + * @return static + */ + public function withKeyIn(iterable $keys): TermQueryInterface; + + /** + * @param iterable $labels + * @return static + */ + public function withLabelIn(iterable $labels): TermQueryInterface; + + /** + * @return static + */ + public function withIsHierarchical(bool $isHierarchical): TermQueryInterface; + + /** + * @param string $keyOrLabelPart The part of the key or label that the terms have to match. + * @return static + */ + public function withKeyOrLabelLike(string $keyOrLabelPart): TermQueryInterface; + + /** + * @return static + */ + public function withLabelLike(string $labelPart): TermQueryInterface; + + /** + * @return static + */ + public function withDescriptionLike(string $descriptionPart): TermQueryInterface; + + /** + * @return static + */ + public function withParentId(int $termId): TermQueryInterface; +} diff --git a/src/Taxonomy/TermQueryResultInterface.php b/src/Taxonomy/TermQueryResultInterface.php new file mode 100644 index 0000000..7e2cd59 --- /dev/null +++ b/src/Taxonomy/TermQueryResultInterface.php @@ -0,0 +1,17 @@ + + */ +interface TermQueryResultInterface extends EntityQueryResultInterface +{ +} diff --git a/src/User/UserInterface.php b/src/User/UserInterface.php new file mode 100644 index 0000000..b697e26 --- /dev/null +++ b/src/User/UserInterface.php @@ -0,0 +1,36 @@ + + */ + public function getRoles(): iterable; +} diff --git a/src/User/UserQueryInterface.php b/src/User/UserQueryInterface.php new file mode 100644 index 0000000..c3c9de9 --- /dev/null +++ b/src/User/UserQueryInterface.php @@ -0,0 +1,32 @@ + $roleKeys + * @return static + */ + public function withRoleIn(iterable $roleKeys): self; + + /** + * @param iterable $roleKeys + * @return static + */ + public function withRoleNotIn(iterable $roleKeys): self; +} diff --git a/src/User/UserQueryResultInterface.php b/src/User/UserQueryResultInterface.php new file mode 100644 index 0000000..1cd2db3 --- /dev/null +++ b/src/User/UserQueryResultInterface.php @@ -0,0 +1,18 @@ + + */ +interface UserQueryResultInterface extends EntityQueryResultInterface +{ + +}