Download the PHP package nahid/qarray without Composer

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

PHP QArray

QArray - Query Engine For Array

QArray is query engine for PHP array data. It helps to developers querying any kind of array data with ORM like feel.

Installation

Implementation

Since QArray is an abstract layer of code, so you have to implement your own system with a lots of pre build functionality.

Lets start our first implementation for JSON data.

Here you see we implement a new engine for JSON data. QueryEngine is an abstract class, so we have to implement its two abstract function readPath and parseData

Usage

Our implementation were complete, now we can use this implementation.

Here we develop a class for Products and this class use JsonQueryEngine for fetch data from JSON file.

Lets see, how to use it.

here is our JSON file data.json

And now we read it to querying data.

Output

Pretty neat, huh?

Let's explore the full API to see what else magic this library can do for you. Shall we?

API

List of API:

Available operation for where clause

example:

Let's say you want to find the 'users' who has id of 1. You can do it like this:

You can add multiple where conditions. It'll give the result by AND-ing between these multiple where conditions.

See a detail example here.

orWhere(key, op, val)

Parameters of orWhere() are the same as where(). The only difference between where() and orWhere() is: condition given by the orWhere() method will OR-ed the result with other conditions.

For example, if you want to find the users with id of 1 or 2, you can do it like this:

See detail example here.

whereIn(key, val)

This method will behave like where(key, 'in', val) method call.

whereNotIn(key, val)

This method will behave like where(key, 'notin', val) method call.

whereNull(key)

This method will behave like where(key, 'null') or where(key, '=', null) method call.

whereNotNull(key)

This method will behave like where(key, 'notnull') or where(key, '!=', null) method call.

whereStartsWith(key, val)

This method will behave like where(key, 'startswith', val) method call.

whereEndsWith(key, val)

This method will behave like where(key, 'endswith', val) method call.

whereContains(key, val)

This method will behave like where(key, 'contains', val) method call.

whereDataType(key, val)

This method will behave like whereDataType(key, 'type', val) method call.

sum(column)

Bugs and Issues

If you encounter any bugs or issues, feel free to open an issue at github.

Also, you can shoot me an email to mailto:[email protected] for hugs or bugs.


All versions of qarray with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
myclabs/deep-copy Version ^1.8
ext-json Version *
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 nahid/qarray contains the following files

Loading the files please wait ....