Download the PHP package anh/doctrine-extensions-resource without Composer

On this page you can find all versions of the php package anh/doctrine-extensions-resource. 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 doctrine-extensions-resource

Doctrine2 resource extension

Build Status Scrutinizer Code Quality SensioLabsInsight

Extension provides simplified and unified interface for working with resources.

Installation

Symfony integration

There is a bundle or package for that.

Usage

Defining resources

Resource definition is an array with required and optional keys.

Initialization

You should configure object manager to use ResourceRepositoryFactory as repository factory in order to inject paginator and rule resolver services into repositories. Extension can use any paginator compatible with ResourcePaginatorInterface.

Create entity manager, event dispatcher, add event subscriber and create ResourceManagerFactory.

CRUD operations with ResourceManager.

Each resource type has it's own resource manager, to instantiate it you should use ResourceManagerFactory::create().

Events

Code above will generate this events:

Fetching resources with ResourceRepository.

ResourceRepository has two methods for fetching resources: paginate() and fetch().

See orm-example.php.

Advanced criteria format

You can use advanced criteria format for filtering. It's not limited to equal comparison only. For example:

Advanced comparison

If the field name starts with % then advanced format for field should follow. It consists of the array with a single element, where key is the comparison operator and value is parameter for operator. Common operators are: >, <, >=, <=, <> and others, for full list refer to QueryBuilderAdapter of each driver.

Comparison types

Symbol # with following and or or is used for changing comparison type. Comparison types can be nested.

Multiple criteria on the same field

If you need a few criteria for the same field, simply add a dash followed by a number. Apply the same for the comparison types.

Rules

Rule is predefined group of criteria for resource. You can define it in resource definition (key rules). When rule is defined you can use its name in square brackets as criterion for ResourceRepository::paginate() and ResourceRepository::fetch() methods.

Auto joins

Query builder adds inner join automatically... (to be written)

This advanced criteria format is valid for all available drivers (ORM, PHPCR-ODM, MongoDB-ODM).

Note

Not all operators are available for each driver.

Credits

Inspired by SyliusResourceBundle from Sylius.

Versioning

Library uses semantic versioning.

License

MIT


All versions of doctrine-extensions-resource with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
doctrine/common Version ~2.2
symfony/event-dispatcher Version ~2.4
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 anh/doctrine-extensions-resource contains the following files

Loading the files please wait ....