Coder Social home page Coder Social logo

Provider for Zend\Db about zfc-rbac HOT 9 CLOSED

zf-commons avatar zf-commons commented on July 19, 2024
Provider for Zend\Db

from zfc-rbac.

Comments (9)

bakura10 avatar bakura10 commented on July 19, 2024

That would be nice but would need to refactor some parts to use adapter pattern. Currently the objects all use Doctrine directly.

Remember though that the dependency is on doctrine dbal, not ORM, this is quite light.

Envoyé de mon iPhone

Le 26 avr. 2013 à 13:02, Mech7 [email protected] a écrit :

Currently the db relies on doctrine, which is annoying if you already use zend\db
it would be nice if there would be a implementation for a zend's db provider.


Reply to this email directly or view it on GitHub.

from zfc-rbac.

jmleroux avatar jmleroux commented on July 19, 2024

I made a provider for Zend\Db.
You can look in closed pull requests, but i didn't have the time to finish it.

from zfc-rbac.

jmleroux avatar jmleroux commented on July 19, 2024

I started this one : https://github.com/jmleroux/JmlRbacZdb

from zfc-rbac.

bakura10 avatar bakura10 commented on July 19, 2024

That looks nice. However is this REALLY needed ? Can't you just configure doctrine dbal ? I doubt this code will change a lot but this needs that we need to maintain the code at two places if we have this. Maybe @spiffyjr should have chosen Zend\Db from the ground up to add no new dependency, but well, Doctrine\DBAL is a pretty light library (and between us, it's better than Zend\Db).

from zfc-rbac.

spiffyjr avatar spiffyjr commented on July 19, 2024

Yea, but people using Zend\Db likely have a connection setup for it already and aren't using Doctrine DBAL at all. Perhaps the best option is to just use a PDO connection instead?

from zfc-rbac.

bakura10 avatar bakura10 commented on July 19, 2024

It won't remove any problem. In each cases people using Zend\Db will have to rewrite their config connections parameters even if we use PDO. But yeah, PDO is the lightest solution of all =).

from zfc-rbac.

spiffyjr avatar spiffyjr commented on July 19, 2024

Yea, but the base of Zend\Db and Doctrine\DBAL is PDO, correct? They could all use the PDO and inject it into either Doctrine\DBAL or Zend\Db.

from zfc-rbac.

cdekok avatar cdekok commented on July 19, 2024

The base of zend\db is not pdo, but it has a pdo adapter (and others).. the main problem is that i would not like to write my own rbac module, but I don't want 2 database connections (and t2 different db abstractions layers) in my application either ;)

from zfc-rbac.

bakura10 avatar bakura10 commented on July 19, 2024

Hi @mech7 ,

Next version of ZfcRbac (currently in refactor branch) is now more agnostic and does not rely on anything. It's up to the developer to develop its own providers.

from zfc-rbac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.