remove IDb interface from core class usage

This commit is contained in:
Bernhard Posselt 2015-02-25 13:18:36 +01:00 committed by Thomas Müller
parent c62eb9d652
commit 59bbf27253
3 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ class Server extends SimpleContainer implements IServerContainer {
return new PreviewManager();
});
$this->registerService('TagMapper', function(Server $c) {
return new TagMapper($c->getDb());
return new TagMapper($c->getDatabaseConnection());
});
$this->registerService('TagManager', function (Server $c) {
$tagMapper = $c->query('TagMapper');

View File

@ -22,7 +22,7 @@ namespace OC\Tagging;
use \OCP\AppFramework\Db\Mapper,
\OCP\AppFramework\Db\DoesNotExistException,
\OCP\IDb;
\OCP\IDBConnection;
/**
* Mapper for Tag entity
@ -32,9 +32,9 @@ class TagMapper extends Mapper {
/**
* Constructor.
*
* @param IDb $db Instance of the Db abstraction layer.
* @param IDBConnection $db Instance of the Db abstraction layer.
*/
public function __construct(IDb $db) {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'vcategory', 'OC\Tagging\Tag');
}

View File

@ -49,7 +49,7 @@ class Test_Tags extends \Test\TestCase {
->will($this->returnValue($this->user));
$this->objectType = $this->getUniqueID('type_');
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDb());
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDatabaseConnection());
$this->tagMgr = new OC\TagManager($this->tagMapper, $this->userSession);
}