diff --git a/src/Selector/Selector.php b/src/Selector/Selector.php index e89e8a29..a91b67a0 100644 --- a/src/Selector/Selector.php +++ b/src/Selector/Selector.php @@ -2,8 +2,14 @@ namespace PHPat\Selector; +use PHPat\Selector\Modifier\AllOfSelectorModifier; use PHPat\Selector\Modifier\AndModifier; +use PHPat\Selector\Modifier\AnyOfSelectorModifier; +use PHPat\Selector\Modifier\AtLeastCountOfSelectorModifier; +use PHPat\Selector\Modifier\AtMostCountOfSelectorModifier; +use PHPat\Selector\Modifier\NoneOfSelectorModifier; use PHPat\Selector\Modifier\NotModifier; +use PHPat\Selector\Modifier\OneOfSelectorModifier; final class Selector extends SelectorPrimitive { @@ -16,4 +22,34 @@ public static function NOT(SelectorInterface $selector): NotModifier { return new NotModifier($selector); } + + public static function AllOf(SelectorInterface ...$selectors): AllOfSelectorModifier + { + return new AllOfSelectorModifier(...$selectors); + } + + public static function AnyOf(SelectorInterface ...$selectors): AnyOfSelectorModifier + { + return new AnyOfSelectorModifier(...$selectors); + } + + public static function NoneOf(SelectorInterface ...$selectors): NoneOfSelectorModifier + { + return new NoneOfSelectorModifier(...$selectors); + } + + public static function AtLeastCountOf(int $count, SelectorInterface ...$selectors): AtLeastCountOfSelectorModifier + { + return new AtLeastCountOfSelectorModifier($count, ...$selectors); + } + + public static function AtMostCountOf(int $count, SelectorInterface ...$selectors): AtMostCountOfSelectorModifier + { + return new AtMostCountOfSelectorModifier($count, ...$selectors); + } + + public static function OneOf(SelectorInterface ...$selectors): AtLeastCountOfSelectorModifier + { + return new OneOfSelectorModifier(...$selectors); + } }