PHPackages                             phprest/phprest-service-request-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phprest/phprest-service-request-filter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phprest/phprest-service-request-filter
======================================

Phprest Request Filter Service.

2880[3 issues](https://github.com/phprest/phprest-service-request-filter/issues)PHP

Since Jun 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phprest/phprest-service-request-filter)[ Packagist](https://packagist.org/packages/phprest/phprest-service-request-filter)[ RSS](/packages/phprest-phprest-service-request-filter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phprest Request Filter Service
==============================

[](#phprest-request-filter-service)

[![Author](https://camo.githubusercontent.com/2d3fe39a5db918fba059145d397ad932c4b5a88cc66d8bcc8ad7138ca1228286/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406164616d6d62616c6f67682d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/adammbalogh)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Description
===========

[](#description)

Request Filter Service which is able to filter your incoming request by:

- query
- sort
- limit
- offset

Components
----------

[](#components)

There are 3 main component in filtering:

- Obtainer
- Parser
- Processor

### Obtainer

[](#obtainer)

Is the way as you get the filtering key and its data from the request.

E.g.: [QueryInHeader Obtainer](src/Implementation/Query/Obtainer/QueryInHeader.php)

### Parser

[](#parser)

Is the way how you analyze the obtained filter.

E.g.: [CommaMinus Parser](src/Implementation/Sort/Parser/CommaMinus.php)

### Processor

[](#processor)

Which is processing your parsed filter.

E.g.: [Orm Processor](src/Processor/Orm.php)

Installation
============

[](#installation)

Install it through composer.

```
{
    "require": {
        "phprest/phprest-service-request-filter": "@stable"
    }
}
```

**tip:** you should browse the [`phprest/phprest-service-request-filter`](https://packagist.org/packages/phprest/phprest-service-request-filter)page to choose a stable version to use, avoid the `@stable` meta constraint.

Usage
=====

[](#usage)

Configuration
-------------

[](#configuration)

For the configuration you should check the [Config](src/Config.php) class.

Registration
------------

[](#registration)

```
