Download the PHP package eltharin/autoqb without Composer

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

Symfony AutomaticQueryBuilder Bundle

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

What is AutomaticQueryBuilder Bundle?

This bundle will create automatic custom queryBuilder (DQL) in repository.

Joins can be piloted by arguments without create one function each time joins are not the same.

How It Works ?

First add AutoQbRepository trait in your repository.

This add getDQL() function and change findAll() :

Now you can use it.

Inline method

In a service you can call your repository and ask link directly in getDQL function :

Considering $myRepository is ClassTest1 Entity Repository, DQL query will be :

alias is tableName by default, or autoQBAlias property in repository or you can ether set in DQLOptions

you can pass a DqlOptions object to getDQL to ask relation :

Considering ClassTest1 as a relation to entity ClassTest2, DQL query will be :

you can ask a relation from relation without request middle, that's automatic :

Considering ClassTest1 as a relation to entity ClassTest2, DQL query will be :

you find it's not enought automatic ? OK let's go for attributes

By properties attributes

You can also add attributes to your relations to make it more automatic, note you can have many attributes, the first compatible with your query will be taken :

We can add a relation to ClassTest4 in our entity, and add a AutoQBField attribute, with autolink at true, relation will be always taken.

now if we execute getDQL :

Considering $myRepository is ClassTest1 Entity Repository, DQL query will be :


You can change the jointype :

now if we execute getDQL :

Considering $myRepository is ClassTest1 Entity Repository, DQL query will be :


Automatic is good, but sometimes we want a relation only if root,

For example ClassTest1 have a manyToOne relation to ClassTest2 whitch have a manyToOne relation with ClassTest3

When we query ClassTest1 with ClassTest2 relation, we don't want have ClassTest3 automaticly but if we query ClassTest2 we want ever.

in ClassTest2 we add a AutoQbField attribute on ClassTest3 relation, add autolink and whenAlias arguments :

will render DQL :

and

will render DQL :

now imagine you have a property in ClassTest2 named "visible". when you make a query on ClassTest1 you want have only classTest2 visible but in some circonstances, you want have all.

Remember, you can have many AutoQbField attributes :

note we have set the relationAlias argument in first.

now :

will render DQL :

and if we query the alias :

will render DQL :

you can also ask indexBy relation :

will render DQL :

Now, IF you want more, you can make your own function in repository and call it :


All versions of autoqb with dependencies

PHP Build Version
Package Version
No informations.
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 eltharin/autoqb contains the following files

Loading the files please wait ...