Skip to content

view-components/doctrine-data-processing

Repository files navigation

Logo ViewComponents\DoctrineDataProcessing

Release Build Status Scrutinizer Code Quality Code Coverage

Doctrine ORM support for ViewComponents

Table of Contents

Requirements

  • PHP 5.5+ (hhvm & php7 are supported)

Installation

The recommended way of installing the component is through Composer.

Run following command from your project folder:

composer require view-components/doctrine-data-processing

Usage

Code example:

use Doctrine\DBAL\Query\QueryBuilder;
use ViewComponents\Doctrine\DoctrineDataProvider;
use ViewComponents\ViewComponents\Data\Operation\FilterOperation;

$builder = new QueryBuilder($doctrineConnection);
$builder
    ->select('*')
    ->from('test_users');
$provider = new DoctrineDataProvider($builder);
$provider->operations()->add(
    new FilterOperation('role', FilterOperation::OPERATOR_EQ, 'Manager')
);
foreach ($provider as $user) {
   var_dump($user);
}

Contributing

Please see Contributing Guidelines and Code of Conduct for details.

Testing

This package bundled with unit tests (PHPUnit).

To run tests locally, you must install this package as stand-alone project with dev-dependencies:

composer create-project view-components/doctrine-data-processing

Command for running tests:

composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

© 2015 — 2016 Vitalii Stepanenko

Licensed under the MIT License.

Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages