Download the PHP package chrisandchris/passive-record-orm without Composer

On this page you can find all versions of the php package chrisandchris/passive-record-orm. 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 passive-record-orm

A QueryBuilder and passive record ORM for Symfony2

Build Status Code Climate Test Coverage Version Downloads Licence

Despite it's package name, it's not simply a row mapper. And it's not simply for Symfony. This project is a QueryBuilder and a Mapper for SQL Result Sets, both combined but still very separated, so you can use them independent.

This doc gives a short overview of all the possibilities this package provides. We are moving the contents continuously to the doc/ directory, so look more detailed information up there.

Was it does

Internals

The basic internal principal is the following:

How To Use

 Configuration

Configure your symfony2 project as you do always. The bundle uses the database information stored in the parameters.yml and automatically connects to the given database.

Actually, there is no further configuration possible.

A simple query

Let's create a service definition:

Create the repository:

If you want to map a more complicated query to a class, use something like this:

And to map, use this method

Some more information

The field() method

You could use an array for separating database, table, field:

If you fetch single fields, you must append a comma by yourself:

You could also give a closure as parameter:

The value() method

Use this method to append a parameter to the query:

The fieldlist() method

This method is even much more powerful, use it as follows:

Simple key-value usage:

Specify database, table, field:

Mix anything

The f(), where(), order(), groupBy()

Any of these four types open so-called "braces". A brace represents a kind of sub-query which is fully independent from the query before. In its internals, during parsing this sub-query, the parser has principally no access to the other statements.

So, if you finish one of these, simply call close() or end() to close the brace:

The raw()

Because of the lack of time and to fulfill any requirement, I simply implemented a raw method. And gladly, this method is able to use parameters :D

The in()

You can simply build IN-clauses with the two following methods:

Option A uses prepared statements all-the-way, any value within the array gets is way as a parameter to the database.

Conditional appending

There are three methods to provide conditional appending:

You are allowed to nest ifs, and you are allowed to push a closure as parameter to the if:

Some other methods


All versions of passive-record-orm with dependencies

PHP Build Version
Package Version
Requires php Version >=7
symfony/symfony Version ^2.7|^3.3
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 chrisandchris/passive-record-orm contains the following files

Loading the files please wait ....