We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emulates filter bc we have only addFilter or addSorter setters
addFilter
addSorter
class SortedFilter implements SequenceInterface, FilterInterface { private string $value; /** @var SpecificationInterface[] */ private array $specifications; public function __construct(string $value, SpecificationInterface ...$specifications) { $this->value = $value; $this->specifications = $specifications; } /** * @return SpecificationInterface[] */ public function getSpecifications(): array { return $this->specifications; } public function getValue(): string { return $this->value; } public function withValue($value): ?SpecificationInterface { return $this; } }
The text was updated successfully, but these errors were encountered:
Usage:
$schema->addFilter( 'filter', new Filter\Select( [ 'upcoming' => new SortedFilter( 'upcoming', new Filter\Gt('date', new DateTimeImmutable('now')), new AscSorter('date') ), 'mostReviewed' => new SortedFilter( 'mostReviewed', new Filter\Lte('date', new DateTimeImmutable('now')), new DescSorter('count_reviews') ) ] ) );
Sorry, something went wrong.
#14 Add sequential specifications as sorter and filter
e006213
vvval
Successfully merging a pull request may close this issue.
emulates filter bc we have only
addFilter
oraddSorter
settersThe text was updated successfully, but these errors were encountered: