Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #46 from Keops92/zend-validator-32
Browse files Browse the repository at this point in the history
Let AbstractDb implement AdapterAwareInterface
  • Loading branch information
weierophinney committed Feb 17, 2016
2 parents fd2a1c8 + 1e58715 commit 1f1aa89
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/Db/AbstractDb.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Traversable;
use Zend\Db\Adapter\Adapter as DbAdapter;
use Zend\Db\Adapter\AdapterAwareTrait;
use Zend\Db\Sql\Select;
use Zend\Db\Sql\Sql;
use Zend\Db\Sql\TableIdentifier;
Expand All @@ -23,6 +24,8 @@
*/
abstract class AbstractDb extends AbstractValidator
{
use AdapterAwareTrait;

/**
* Error constants
*/
Expand Down Expand Up @@ -64,13 +67,6 @@ abstract class AbstractDb extends AbstractValidator
*/
protected $exclude = null;

/**
* Database adapter to use. If null isValid() will throw an exception
*
* @var \Zend\Db\Adapter\Adapter
*/
protected $adapter = null;

/**
* Provides basic configuration for use with Zend\Validator\Db Validators
* Setting $exclude allows a single record to be excluded from matching.
Expand Down Expand Up @@ -166,8 +162,7 @@ public function getAdapter()
*/
public function setAdapter(DbAdapter $adapter)
{
$this->adapter = $adapter;
return $this;
return $this->setDbAdapter($adapter);
}

/**
Expand Down

0 comments on commit 1f1aa89

Please sign in to comment.