Download the PHP package drewlabs/http-query without Composer

On this page you can find all versions of the php package drewlabs/http-query. 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 http-query

HTTP Query

This library provides a client side implementation of HTTP query (similar to graphql) that allows developpers to easily customize data requested from web resources (that support the server side language implementation) and directly sending complex query parameters.

Usage

Query builder

The library comes with a query builder class that provides a fluent interface for building and compiling queries. An example is as follow:

As seen above, the API comes with numerous fluent methods for defining query intention:

The eq method allow developpers to build a COLUMN=VALUE like query:

The neq is the inverse of the eq query method:

The lte and lt respectively allow developper to construct a query that check if a column value is less than (less than or equal to) a given value.

The gte and gt respectively allow developper to construct a query that check if a column value is greater than (greater than or equal to) a given value.

The in clause search for value that exists in a list of provided values:

The exists clause allow to query for relationship existance in the database.

The sort clause allow developpers to apply a sort by column on the result set:

Note The sort order is defined by an integer value. Any value greater than 0 get converted to ASC while any value less than 0 is converted to DESC

The select clause allows developpers to specify the list of columns to select from the query server:

Note As shown in the examples above, query object provides a fluent api for building complex queries using PHP function calls.

Executing composed query

After building query using the fluent API, developpers can send query requests to backend servers using the execute method:

Aggregation framework

The query api also support some aggregation method for performing basic mathematic computation on the resource being selected instead of returning an entire collection:

Note All aggregation method support a second parameter allowing developpers to query a releated resource in the application database.


All versions of http-query with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
drewlabs/query Version ^0.3.0
drewlabs/curl-client Version ^0.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 drewlabs/http-query contains the following files

Loading the files please wait ....