Download the PHP package contenir/contenir-db-queryfilter without Composer

On this page you can find all versions of the php package contenir/contenir-db-queryfilter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contenir-db-queryfilter

contenir/contenir-db-queryfilter

Continuous Integration codecov

Filterable, paginated php-db queries driven by a search form, for Contenir CMS and any Laminas MVC or Mezzio application.

You describe each query parameter once, as a filter class. The filter supplies its form element and input validation, and changes the SQL Select according to the submitted value. A query filter reads the request through the form, applies every filter to a table's select, and hands back a Laminas Paginator adapter, or prev/next navigation around a record. A contenir-db-model 2 repository can be the table directly, so pages are hydrated entities.

Requirements

The 1.x releases, built on laminas-db and supporting PHP 8.1, remain available from the 1.x branch; see UPGRADE-2.0.md.

Install

laminas-component-installer registers the ConfigProvider (Mezzio) or the Contenir\Db\QueryFilter module (Laminas MVC). See framework integration to do it by hand.

Usage

1. Filters

2. A form built from the filters

3. Filter and paginate

With contenir-db-model 2 the repository needs no extra code, and the paginator yields entities:

A plain repository works too, wrapped in RepositoryTable:

See Tables for other table gateways.

In a Laminas MVC controller, $this->queryFilter(QueryFilter::class) builds the query filter from the service manager instead.

Public API

Class Role Reference
Filter\AbstractFilter, AbstractFilterText, AbstractFilterSelect, AbstractFilterRadio, AbstractFilterHidden, AbstractFilterImmutable, FilterTrait Filter types and their shared properties and helpers Filters
FilterSet Ordered filters plus input values Filters
AbstractForm, Form Laminas form built from a filter set Forms
QueryFilterInterface, AbstractQueryFilter, QueryFilter Request handling, pagination, hooks, prev/next navigation Query filters
QueryFilterTableInterface What a table or repository provides: createSelect(), fetch() Query filters
RepositoryTable Adapts any contenir-db-model 2 Repository to the interface (needs contenir-db-model) Query filters
Paginator\SelectAdapter Laminas Paginator adapter returned by getPagingResultSet() Query filters
ConfigProvider, Module, Controller\Plugin\QueryFilterPlugin, Controller\Plugin\QueryFilterPluginFactory Configuration and the MVC controller plugin Framework integration

Configuration

The package has no configuration keys. Its ConfigProvider and Module register the queryFilter controller plugin (aliases queryFilter and QueryFilter) under controller_plugins. Query filters built by the plugin must be registered with your service manager; see the plugin.

Development

The QA toolchain is php-db/phpdb-qa-tools. Mago is a standalone binary, installed separately (brew install mago).

License

BSD-3-Clause. See LICENSE.md.


All versions of contenir-db-queryfilter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laminas/laminas-db Version ^2.0
laminas/laminas-form Version ^3.20
laminas/laminas-paginator-adapter-laminasdb Version ^1.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package contenir/contenir-db-queryfilter contains the following files

Loading the files please wait ...