Download the PHP package jurjean/spray-persistence-bundle without Composer

On this page you can find all versions of the php package jurjean/spray-persistence-bundle. 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 spray-persistence-bundle

Spray\PersistenceBundle

A Symfony2 bundle that enhances Doctrine2 repository functionality.

Build Status Scrutinizer Quality Score Code Coverage

Introduction

This bundle provides a way to query your objects in an abstract manner:

It has a common API:

Allows easy pagination:

And can be used standalone as well! You don't need symfony, you can integrate it in any framework of choice (however Doctrine is a requirement).

Installation

Require "jurjean/spray-persistence-bundle" in your composer.json:

Register SprayPersistenceBundle in your AppKernel:

The problem

Doctrine2 provides a nice API that lets you query for entities through a repository. However the repository pattern is not very DRY.

If you want to do queries like described above, you could end up with a repository like so:

As you can imagine, the only way to add more conditions is by duplication. That's where the RepositoryFilter comes in.

Entity filters

Prioritized entity filters

You may want a filter to be prioritized. To do so you must implement the PrioritizedFilterInterface:

No matter in which order you add these filters, the order of execution still would be first and then last.

Conflicting entity filters

If you have filters that may conflict with each other (for instance if they add a where statement on the same column) you can implement the ConflictingFilterInterface:

If 'another' exists in the repository filter scope, it will be removed if ArticlesConflictingWith is added.

Filter registry

The filter registry is used to provide repository filters with available entity filters. You can either build them up programmatically, or create registry classes yourself. After that you need to inject the registry into the repository filter.

Symfony integration

You can configure your repository filters easily by extending the parent di container definition _spray_persistence.repositoryfilter, and providing it with an Entity name as argument.

Filters are added by tagging them with name _spray_persistence.entityfilter. You can either set them up globally (for all repositories) or locally (for one repository). You make them local by adding repository as a tag option.

Examples

For more examples please have a look at the integration tests for this project.


All versions of spray-persistence-bundle with dependencies

PHP Build Version
Package Version
Requires doctrine/orm Version 2.*
doctrine/doctrine-bundle Version 1.*
symfony/dependency-injection Version 2.*
symfony/http-kernel Version 2.*
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 jurjean/spray-persistence-bundle contains the following files

Loading the files please wait ....