Filters facade: Difference between revisions

From Sunhill Framework Documentation
Page created
 
More explaination
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== clearFilters() ==
== clearFilters() ==
Clears the list of registered filters.


== addFilters($filters) ==
== addFilters($filters) ==
Adds a filter to the filter list.


== getFiltersByGroup(string $group): array ==
== getFiltersByGroup(string $group): array ==
Returns all filters that belong to a certain group.


== executeFilters(array $filters, FilterContainer $container): string ==
== executeFilters(array $filters, FilterContainer $container): string ==
Takes a list of filters and executes them on the given container. This method has three possible results:
* INSUFFICIENT = There was no error but the execution of the filter chain was not sufficient.
* SUCCESS = The filter chain was executed sucessfully.
* FAILURE = Something went wrong and the filter chain couln't be executed.


== execute(string $group, FilterContainer $container): string ==
== execute(string $group, FilterContainer $container): string ==
Combination of getFiltersByGroup() and executeFilters().


[[Category:Facade]]
[[Category:Facade]]
[[Category:Filters]]
[[Category:Filters]]

Latest revision as of 10:04, 7 October 2024

clearFilters()

Clears the list of registered filters.

addFilters($filters)

Adds a filter to the filter list.

getFiltersByGroup(string $group): array

Returns all filters that belong to a certain group.

executeFilters(array $filters, FilterContainer $container): string

Takes a list of filters and executes them on the given container. This method has three possible results:

  • INSUFFICIENT = There was no error but the execution of the filter chain was not sufficient.
  • SUCCESS = The filter chain was executed sucessfully.
  • FAILURE = Something went wrong and the filter chain couln't be executed.

execute(string $group, FilterContainer $container): string

Combination of getFiltersByGroup() and executeFilters().