zendframework / zend-validator

Validator component from Zend Framework
BSD 3-Clause "New" or "Revised" License
181 stars 136 forks source link

Let AbstractDb implement AdapterAwareInterface #32

Open larsnystrom opened 9 years ago

larsnystrom commented 9 years ago

At the moment Zend\Validator\Db\AbstractDb has a method setAdapter to set the database adapter. I think the canonical way of doing that would be to implement the Zend\Db\Adapter\AdapterAwareInterface's setDbAdapter() instead, maybe by using the Zend\Db\Adapter\AdapterAwareTrait.

weierophinney commented 9 years ago

We haven't done this in the past as the AdapterAwareInterface was added after the validator was created. :)

As for the AdapterAwareTrait, until 2.5, we couldn't have used it.

Feel free to send a PR with these changes.

raultabacu commented 8 years ago

Has this been fixed yet ? If not I would like to give it a try .

raultabacu commented 8 years ago

https://github.com/zendframework/zend-validator/pull/46

samsonasik commented 8 years ago

it close-able

michalbundyra commented 4 years ago

This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at https://github.com/laminas/laminas-validator/issues/46.